feat(ci): add push to gh-pages

pull/1/head
Coelacanthus 2020-10-27 20:42:13 +08:00
parent 970a66c785
commit 5f184df58e
1 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,42 @@
name: Publish Site
on:
push:
paths-ignore:
- 'README.md'
- 'LICENSE'
pull_request:
paths-ignore:
- 'README.md'
- 'LICENSE'
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
with:
submodules: true
- name: Publish Site
uses: chabad360/hugo-gh-pages@master
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
# Remember to set this as a secret (i.e. secrets.PERSONAL_TOKEN).
# Don't forget to set the secret value in the project settings.
#cname: mysite.com # Or anything else
# Use if you have a custom domain for your site.
branch: master # Or anything else
# Use if your site is not hosted on the gh-pages branch.
repo: mtf-wiki/mtf-wiki.github.io
# Use if you're pushing to a different repo.
# Dont add ".git" to the end of the URL (youl'll get 404s).
#hugoVersion: extended_0.76.5
# Use if your site requires a specific version of Hugo.
# Append "extended_" to the begining to use Hugo Extended.
#args: --gc --minify --cleanDestinationDir
# Use if you want to pass some custom arguments to Hugo.
#siteDir: /github/workspace/site
# Use this if your site isn't in the root of your repo.
# The root of your repo can be found at /github/workspace