Skip to content

Commit

Permalink
Deploy Hugo site to gh-pages on merge to master
Browse files Browse the repository at this point in the history
Trigger hugo's deployment process and commit to the gh-pages branch upon merging to master.
  • Loading branch information
patrickod authored Aug 27, 2019
1 parent 69ce235 commit 6a311b9
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: github pages

on:
push:
branches:
- master

jobs:
build-deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master
- name: build
uses: peaceiris/[email protected]
if: github.event.deleted == false
with:
args: --gc --minify --cleanDestinationDir
- name: deploy
uses: peaceiris/[email protected]
if: success()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./public

1 comment on commit 6a311b9

@peaceiris
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check your GitHub Pages status, you find that GitHub Pages build event did not start.

Please do not use GITHUB_TOKEN, use ACTIONS_DEPLOY_KEY or PERSONAL_TOKEN

cf. peaceiris/actions-gh-pages#9

Please sign in to comment.