File tree 2 files changed +50
-3
lines changed
2 files changed +50
-3
lines changed Original file line number Diff line number Diff line change
1
+ name : deploy to GitHub Pages
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+
8
+ jobs :
9
+ deploy :
10
+ name : Deploy to GitHub Pages
11
+ runs-on : ubuntu-latest
12
+ permissions :
13
+ contents : read
14
+ deployments : write
15
+ pages : write
16
+ id-token : write
17
+ environment :
18
+ name : github-pages
19
+ steps :
20
+ - name : Checkout repo
21
+ uses : actions/checkout@v4
22
+ - name : Set up Gleam
23
+ uses : erlef/setup-beam@v1
24
+ with :
25
+ otp-version : " 27.0"
26
+ gleam-version : " 1.5.1"
27
+ rebar3-version : " 3"
28
+ - name : Install dependencies
29
+ run : gleam deps download
30
+ - name : Build app
31
+ run : gleam run -m lustre/dev build app --minify
32
+ - name : Copy output to dist
33
+ run : |
34
+ mkdir -p dist
35
+ cp index.html dist/index.html
36
+ cp -r priv dist/priv
37
+ - name : Update path in index.html to use minified app
38
+ run : sed -i 's|priv/static/todomvc.mjs|priv/static/todomvc.min.mjs|' dist/index.html
39
+ - name : Setup Pages
40
+ uses : actions/configure-pages@v5
41
+ - name : Upload artifact
42
+ uses : actions/upload-pages-artifact@v3
43
+ with :
44
+ path : " dist"
45
+ - name : Deploy to GitHub Pages
46
+ id : deployment
47
+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change 6
6
7
7
< title > TodoMVC: Lustre</ title >
8
8
9
- < link rel ="stylesheet " href ="/priv/static/base.css " />
10
- < link rel ="stylesheet " href ="/priv/static/index.css " />
11
- < script type ="module " src ="/priv/static/todomvc.mjs "> </ script >
9
+ < link rel ="stylesheet " href =". /priv/static/base.css " />
10
+ < link rel ="stylesheet " href =". /priv/static/index.css " />
11
+ < script type ="module " src =". /priv/static/todomvc.mjs "> </ script >
12
12
</ head >
13
13
14
14
< body >
You can’t perform that action at this time.
0 commit comments