diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 957fa302..f4cecd99 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -20,7 +20,7 @@ jobs: # Can't use native `uses: docker://` syntax for GitHub Package Registry... - name: Build Hugo run: | - echo ${{ secrets.GITHUB_REGISTRY_TOKEN }} | docker login docker.pkg.github.com -u $GITHUB_ACTOR --password-stdin + echo ${{ secrets.GITHUB_ACCESS_TOKEN }} | docker login docker.pkg.github.com -u $GITHUB_ACTOR --password-stdin docker run -v $GITHUB_WORKSPACE:/src docker.pkg.github.com/jakejarvis/hugo-custom/hugo-custom:latest --gc --cleanDestinationDir docker logout docker.pkg.github.com @@ -28,9 +28,8 @@ jobs: # add a CNAME file for a custom domain (jarv.is). - name: Prepare for GitHub Pages run: | - mkdir gh-pages - cp -r public/* gh-pages - echo "jarv.is" > gh-pages/CNAME + cp -r $GITHUB_WORKSPACE/public $HOME/gh-pages + echo "jarv.is" > $HOME/gh-pages/CNAME # Initialize a sub-repository in the new gh-pages directory and # add jakejarvis/jakejarvis.github.io as a remote. @@ -38,11 +37,11 @@ jobs: # this setup is a weird edge case not worth making an action for. - name: Deploy to jakejarvis.github.io run: | - cd gh-pages + cd $HOME/gh-pages git init git config user.name "$GITHUB_ACTOR" git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - git remote add target https://${{ secrets.GITHUB_ACCESS_TOKEN }}@github.com/jakejarvis/jakejarvis.github.io.git + git remote add origin 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 + git push --force origin master