From 5f184df58eed0894ddd80e0800b04161c48e461d Mon Sep 17 00:00:00 2001 From: Coelacanthus Date: Tue, 27 Oct 2020 20:42:13 +0800 Subject: [PATCH] feat(ci): add push to gh-pages --- .github/workflows/build-gh-pages.yml | 42 ++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/build-gh-pages.yml diff --git a/.github/workflows/build-gh-pages.yml b/.github/workflows/build-gh-pages.yml new file mode 100644 index 00000000..a391ac03 --- /dev/null +++ b/.github/workflows/build-gh-pages.yml @@ -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