Build website #341
This file contains 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
# This is a basic workflow to help you get started with Actions | |
# based on https://github.com/Chrede88/cjsolsen.com/blob/master/.github/workflows/main.yml | |
# https://github.com/wowchemy/wowchemy-hugo-themes/blob/main/.github/workflows/build-test-site.yaml | |
# https://www.jameswright.xyz/post/20200409/deploy_wowchemy_to_githubio/ | |
name: Build site and deploy to GitHub | |
on: | |
push: | |
branches: | |
- main | |
permissions: write-all | |
jobs: | |
hugo: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
# <<recommended if project uses git submodules for any purpose>> | |
# <<required if deploying to git submodule directory>> | |
token: ${{ secrets.GITHUB_TOKEN }} # <<if needed for private repos>> | |
fetch-depth: 0 | |
# <<fetch-depth: '0' currently required until shallow clone problems are solved>> | |
# https://github.com/marketplace/actions/hugo-setup | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: 'latest' | |
extended: true | |
- name: Build | |
run: hugo --minify | |
# https://github.com/marketplace/actions/hugo-build-and-deploy | |
- name: Build site and push to release branch in the submodule | |
uses: aormsby/[email protected] | |
id: build_step # <<for outputs>> | |
with: | |
source_branch: 'main' | |
release_branch: 'main' | |
submodule_release_branch: 'main' | |
full_rebuild: false | |
hugo_publish_directory: 'public' | |
test_mode: true |