Repository navigation
85 lines (73 loc) · 2.16 KB
/
Copy pathdeploy.yml
File metadata and controls
85 lines (73 loc) · 2.16 KB
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
name: Deploy to GitHub Pages
on:
push:
branches: [master]
workflow_dispatch:
# Allow only one deployment at a time
concurrency:
group: pages
cancel-in-progress: true
env:
FE_VERSION: "26.1.0"
ZOLA_VERSION: "0.19.2"
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: recursive
- name: Check for committed doc bundle
id: docs_bundle
run: |
if [ -f web/static/api/docs.json ]; then
echo "present=true" >> "$GITHUB_OUTPUT"
echo "Using committed pre-built docs (skip fe download + regen)"
else
echo "present=false" >> "$GITHUB_OUTPUT"
fi
- name: Download Fe compiler
if: steps.docs_bundle.outputs.present != 'true'
run: |
curl -L -o fe \
"https://github.com/argotorg/fe/releases/download/v${{ env.FE_VERSION }}/fe_linux_amd64"
chmod +x fe
sudo mv fe /usr/local/bin/fe
fe --version
- name: Generate docs and prepare deployment data
run: |
if [ "${{ steps.docs_bundle.outputs.present }}" = "true" ]; then
make prepare-web
else
make docs
fi
- name: Install Zola
run: |
curl -L -o zola.tar.gz \
"https://github.com/getzola/zola/releases/download/v${{ env.ZOLA_VERSION }}/zola-v${{ env.ZOLA_VERSION }}-x86_64-unknown-linux-gnu.tar.gz"
tar xzf zola.tar.gz
chmod +x zola
sudo mv zola /usr/local/bin/zola
- name: Build site
working-directory: web
run: zola build --base-url https://bountiful.fe-lang.org
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: web/public
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4