Skip to content

Instantly share code, notes, and snippets.

@asishrs
Last active February 5, 2020 03:47
Show Gist options
  • Save asishrs/a26b3122ef4bf68ea77dc9cbae74ca05 to your computer and use it in GitHub Desktop.
Save asishrs/a26b3122ef4bf68ea77dc9cbae74ca05 to your computer and use it in GitHub Desktop.
name: hugo publish
on:
push:
branches:
- master
jobs:
build-deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
# with:
# submodules: true
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.59.1'
- name: Build
run: hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v2
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
EXTERNAL_REPOSITORY: username/external-repository
PUBLISH_BRANCH: master
PUBLISH_DIR: ./public
with:
emptyCommits: false
commitMessage: ${{ github.event.head_commit.message }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment