-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (84 loc) · 2.7 KB
/
deploy.yml
File metadata and controls
100 lines (84 loc) · 2.7 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Compiler WASM et deployer sur GitHub Pages
on:
pull_request:
branches: ["main"]
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
name: Compiler le source francais -> WebAssembly
runs-on: ubuntu-latest
steps:
- name: Cloner le depot
uses: actions/checkout@v4
- name: Configurer Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Configurer Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Installer multilingualprogramming[wasm]
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-build.txt
- name: Compiler les sources francais
run: python scripts/build_wasm_bundle.py
- name: Verifier les artefacts de compilation
run: |
test -f public/generated/automate_packed/module.wasm
test -f public/generated/automate_packed/abi_manifest.json
test -f public/generated/automate_packed_runtime.mjs
test -f public/generated/automate_packed/host_shim.mjs
- name: Verifier la syntaxe JavaScript
run: |
node --check public/automate-core.js
node --check public/app.mjs
node --check public/generated/automate_packed_runtime.mjs
node --check public/generated/automate_packed/host_shim.mjs
- name: Valider le moteur et le WASM
run: |
python tests/french_core_smoke.py
node tests/core_smoke.js
node tests/packed_runtime_smoke.mjs
node tests/static_site_smoke.js
- name: Verifier la structure GitHub Pages
run: |
test -f index.html
test -f .nojekyll
test -f public/index.html
test -d examples
- name: Configurer GitHub Pages
uses: actions/configure-pages@v5
- name: Preparer l'artefact Pages
run: |
rm -rf _site
mkdir -p _site
cp .nojekyll LICENSE README.md _site/
cp -r public/. _site/
cp -r examples docs _site/
- name: Televerser l'artefact Pages
uses: actions/upload-pages-artifact@v3
with:
path: "_site"
deploy:
name: Deployer sur GitHub Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deployer sur GitHub Pages
id: deployment
uses: actions/deploy-pages@v4