File tree 1 file changed +45
-0
lines changed
1 file changed +45
-0
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
+ steps :
18
+ - name : Checkout repo
19
+ uses : actions/checkout@v4
20
+ - name : Set up Gleam
21
+ uses : erlef/setup-beam@v1
22
+ with :
23
+ otp-version : " 27.0"
24
+ gleam-version : " 1.5.1"
25
+ rebar3-version : " 3"
26
+ - name : Install dependencies
27
+ run : gleam deps download
28
+ - name : Build app
29
+ run : gleam run -m lustre/dev build app --minify
30
+ - name : Copy output to dist
31
+ run : |
32
+ mkdir -p dist
33
+ cp index.html dist/index.html
34
+ cp -r priv dist/priv
35
+ - name : Update path in index.html to use minified app
36
+ run : sed -i 's|priv/static/todomvc.mjs|/priv/static/todomvc.min.mjs|' dist/index.html
37
+ - name : Setup Pages
38
+ uses : actions/configure-pages@v5
39
+ - name : Upload artifact
40
+ uses : actions/upload-pages-artifact@v3
41
+ with :
42
+ path : " dist"
43
+ - name : Deploy to GitHub Pages
44
+ id : deployment
45
+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments