1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-19 08:55:32 -04:00

switch from docker action to simple bash commands

This commit is contained in:
2019-10-08 22:48:03 -04:00
parent 1931a7efd8
commit 2e66b81565

View File

@@ -16,14 +16,27 @@ jobs:
# pull from custom Hugo Extended image with opinionated changes # pull from custom Hugo Extended image with opinionated changes
# Docker hub: https://hub.docker.com/r/jakejarvis/hugo-custom # Docker hub: https://hub.docker.com/r/jakejarvis/hugo-custom
# base Dockerfile source: https://go.jarv.is/hugo-dockerfile # base Dockerfile source: https://go.jarv.is/hugo-dockerfile
- uses: docker://jakejarvis/hugo-custom:latest - name: Build Hugo
uses: docker://jakejarvis/hugo-custom:latest
with: with:
args: --gc --cleanDestinationDir args: --gc --cleanDestinationDir
- uses: jakejarvis/github-pages-deploy-action@master # native git commands for speed and simplicity, and because this
env: # setup is a weird edge case not worth making an action for.
PAGES_TOKEN: ${{ secrets.GITHUB_ACCESS_TOKEN }} - name: Push to jakejarvis.github.io
PAGES_CNAME: 'jarv.is' shell: bash
PAGES_SOURCE_FOLDER: 'public' run: |
PAGES_SOURCE_BRANCH: 'master' # copy Hugo output to somewhere we have permissions
PAGES_TARGET_BRANCH: 'master' mkdir gh-pages
PAGES_TARGET_REPO: 'jakejarvis.github.io' cp -r public/* gh-pages
cd gh-pages
# CNAME file for GitHub Pages custom domain
echo "jarv.is" > CNAME
# set up git
git init
git config user.name "Jake Jarvis"
git config user.email "jakejarvis@users.noreply.github.com"
# deploy folder to external *.github.io repository
git remote add target https://${{ secrets.GITHUB_ACCESS_TOKEN }}@github.com/jakejarvis/jakejarvis.github.io.git
git add -A
git commit -m "GitHub Pages deploy from $GITHUB_REPOSITORY@$GITHUB_SHA"
git push --force target master