Created
August 3, 2021 15:04
-
-
Save oliviergimenez/bb8f87f352b0a358e5b40911acaaa16a to your computer and use it in GitHub Desktop.
Github action to build and deploy Hugo website
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Deploy | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: macos-latest | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: '0.79.1' | |
extended: true | |
- name: Build | |
run: hugo --minify | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
personal_token: ${{ secrets.HUGO_WEBSITE_BUILDEPLOY }} | |
external_repository: oliviergimenez/oliviergimenez.github.io | |
publish_dir: ./public | |
publish_branch: master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment