Repository navigation
73 lines (61 loc) · 1.78 KB
/
Copy pathdocs.yml
File metadata and controls
73 lines (61 loc) · 1.78 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
name: Docs
on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: configure pages
uses: actions/configure-pages@v6
with:
enablement: true
- name: install moonbit
run: |
curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash
echo "$HOME/.moon/bin" >> $GITHUB_PATH
- name: post install
run: |
moon version --all
moon update
# The reference and the counts are generated from the interface files; a stale page would
# describe an older library, so the deploy stops instead of publishing it.
- name: the generated pages are current
run: |
python3 scripts/gen_api.py
python3 scripts/gen_stats.py
git diff --exit-code -- docs/
- name: the code on the pages compiles
run: python3 scripts/check_snippets.py
# The demos call this build, so it is made here and never checked in.
- name: build the browser engine
run: |
moon build src/examples/browser --target js --release
mkdir -p docs/engine
cp _build/js/release/build/examples/browser/browser.js docs/engine/moonvec.js
- name: upload the site
uses: actions/upload-pages-artifact@v5
with:
path: docs
deploy:
needs: build
runs-on: ubuntu-26.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: deploy
id: deployment
uses: actions/deploy-pages@v5