-
Notifications
You must be signed in to change notification settings - Fork 1
86 lines (71 loc) · 2.21 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Publish on GitHub pages
on:
push:
branches:
- main
schedule:
- cron: '30 23 1 * *'
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: true # Fetch Hugo themes (true OR recursive)
- name: Login to GitHub Packages Docker Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
logout: false
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version-file: '.nvmrc'
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install required dependencies
run: |
./scripts/github-setup.sh
- name: Setup Hugo
uses: peaceiris/[email protected]
with:
hugo-version: '0.118.2'
extended: true
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores
- name: Create IIIF derivates
env:
CORES: ${{ steps.cpu-cores.outputs.count }}
# UID is also available via $(id -u)
run: |
echo "Running as ${UID}"
docker run -e CHOWN_UID=${UID} -e URL_PREFIX="https://labs.projektemacher.org/" -v ${PWD}:${PWD} ghcr.io/cmahnke/iiif-action:latest-jxl-uploader sh -c "cd ${PWD} && ./scripts/iiif.sh"
- name: Generate Files
env:
SKIP_IIIF: yes
CORES: ${{ steps.cpu-cores.outputs.count }}
run: |
./scripts/setup.sh
- name: Build Hugo site
run: hugo --printI18nWarnings --printUnusedTemplates
- name: Run post build script
run: |
./scripts/post-build/qr-codes.sh
- name: Validate JSON
env:
OSTYPE: linux
run: |
yarn run validate
- name: Puppeteer
run: ./themes/projektemacher-base/scripts/github/check-js-errors.sh
- name: Deploy site
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
force_orphan: true