Last active
February 23, 2020 11:15
-
-
Save jdheyburn/b4b2cad15604de30f21ad0e1a85ee6b9 to your computer and use it in GitHub Desktop.
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 to jdheyburn.github.io | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: "0 10 * * *" | |
jobs: | |
deploy: | |
runs-on: ubuntu-18.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- 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.58.3" | |
extended: true | |
- name: Build | |
run: hugo --gc --minify | |
- 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 }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment