Build and deploy to jdheyburn.github.io #1078
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
name: Build and deploy to jdheyburn.github.io | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
schedule: | |
- cron: "0 10 * * *" | |
jobs: | |
deploy: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Checkout submodules | |
shell: bash | |
run: | | |
auth_header="$(git config --local --get http.https://github.com/.extraheader)" | |
git submodule sync --recursive | |
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: "0.124.1" | |
extended: true | |
- name: Build | |
run: hugo --gc | |
- name: Copy CNAME | |
run: cp CNAME ./public/ | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
deploy_key: ${{ secrets.DEPLOY_KEY }} | |
external_repository: jdheyburn/jdheyburn.github.io | |
publish_branch: master | |
publish_dir: ./public | |
commit_message: ${{ github.event.head_commit.message }} |