-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (76 loc) · 2.37 KB
/
deploy.yaml
File metadata and controls
90 lines (76 loc) · 2.37 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
name: Build and Deploy
on:
workflow_dispatch:
push:
branches:
- main
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build-and-deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Base setup
run: mkdir -p public
- name: Setup JS version
run: |
cp -r tictactoe_javascript/ public/javascript
- name: Install elm, elm-format and cache the ELM_HOME directory
uses: mpizenberg/elm-tooling-action@v1.7
with:
cache-key: elm-home-${{ hashFiles('elm-tooling.json', 'elm.json') }}
cache-restore-key: elm-home
elm-tooling-dir: tictactoe_elm
- name: Setup Elm version
run: elm make src/Main.elm --output=../public/elm/index.html
working-directory: tictactoe_elm
- name: Setup java
uses: actions/setup-java@v5
with:
distribution: "oracle"
java-version: "22"
- name: Install clojure tools
uses: DeLaGuardo/setup-clojure@13.5
with:
cli: latest
- name: Setup ClojureScript version
run: |
sudo apt install rlwrap
clj -M -m cljs.main --optimizations advanced -c tictactoe.core
mkdir -p ../public/clojurescript
cp out/main.js ../public/clojurescript/main.js
cp index.html ../public/clojurescript/index.html
working-directory: tictactoe_clojurescript
- name: Set up wabt
run: |
sudo apt update
sudo apt install wabt
- name: Setup WASM version
run: |
mkdir -p ../public/wasm
wat2wasm tictactoe_wasm.wat -o tictactoe_wasm.wasm
cp tictactoe_wasm.wasm ../public/wasm/tictactoe_wasm.wasm
cp index.html ../public/wasm/index.html
working-directory: tictactoe_wasm
- name: Copy Manual Index
run: |
cp docs/index.html public/index.html
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: ./public
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4