-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (36 loc) · 1.1 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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.104.3"
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 }}