File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed
Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy on Github Pages
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ # Build job
10+ build :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout tree
14+ uses : actions/checkout@v4
15+
16+ - name : Set-up OCaml
17+ uses : ocaml/setup-ocaml@v3
18+ with :
19+ ocaml-compiler : 5.3
20+
21+ - run : |
22+ opam pin add -n git@github.com:dbuenzli/brr.git
23+ opam install brr lwt yojson wasm_of_ocaml-compiler
24+
25+ - name : Build
26+ run : cd src/web && dune build @all
27+
28+ - name : Build archive
29+ run : |
30+ (cd _build/default/src/web && tar zcf - data icon*.png index.html manifest.json viewer.bc.wasm.* service_worker/service_worker.bc.js) > github-pages.tar.gz
31+
32+ - uses : actions/upload-artifact@v4
33+ with :
34+ name : github-pages
35+ path : github-pages.tar.gz
36+
37+ # Deploy job
38+ deploy :
39+ needs : build
40+
41+ # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
42+ permissions :
43+ pages : write # to deploy to Pages
44+ id-token : write # to verify the deployment originates from an appropriate source
45+
46+ # Deploy to the github-pages environment
47+ environment :
48+ name : github-pages
49+ url : ${{ steps.deployment.outputs.page_url }}
50+
51+ # Specify runner + deployment step
52+ runs-on : ubuntu-latest
53+ steps :
54+ - name : Deploy to GitHub Pages
55+ id : deployment
56+ uses : actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action
You can’t perform that action at this time.
0 commit comments