-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (34 loc) · 1.12 KB
/
gh-pages.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
name: Deploy to GitHub Pages
on:
push:
branches: [ main ]
workflow_call:
schedule:
- cron: '0 2 * * 4' # Every Thursday at 2:00 AM UTC
jobs:
test:
uses: "OpenTermsArchive/opentermsarchive.org/.github/workflows/test.yml@main"
deploy:
needs: [ test ]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Set Hugo up
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.127.0'
extended: true # Prevent error building site: POSTCSS: failed to transform, see https://gohugo.io/troubleshooting/faq/#i-get-this-feature-is-not-available-in-your-current-hugo-version
- name: Build with Hugo
env:
UPTIMEROBOT_API_KEY: ${{ secrets.UPTIMEROBOT_API_KEY }}
run: npm run build
- name: Deploy ./public directory to the remote gh-pages branch
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
cname: opentermsarchive.org