File tree Expand file tree Collapse file tree 6 files changed +52
-14
lines changed Expand file tree Collapse file tree 6 files changed +52
-14
lines changed Original file line number Diff line number Diff line change @@ -12,20 +12,28 @@ jobs:
1212 runs-on : ubuntu-latest
1313
1414 steps :
15- - uses : actions/checkout@v4
16- - uses : actions/setup-node@v4
15+ name : Build static files
16+ id : build
17+ uses : actions/checkout@v4
18+ uses : actions/setup-node@v4
19+ with :
20+ node-version-file : " .nvmrc"
21+ cache : " npm"
22+ run : npm ci
23+ run : npm run build
24+ - name : Upload static files as artifact
25+ id : deployment
26+ uses : actions/upload-pages-artifact@v3
1727 with :
18- node-version-file : " .nvmrc"
19- cache : " npm"
20- - run : npm ci
21- - run : npm run build
28+ path : public/
2229
2330 deploy :
2431 needs : build
2532
2633 permissions :
2734 pages : write
2835 id-token : write
36+ actions : read
2937
3038 environment :
3139 name : github-pages
Original file line number Diff line number Diff line change 11node_modules
22elm-stuff
33.DS_Store
4- .idea
4+ .idea
5+
6+ # Build output
7+ public /main.js
Original file line number Diff line number Diff line change 22 "name" : " guida-lang.org" ,
33 "version" : " 1.0.0" ,
44 "scripts" : {
5- "build" : " elm make src/Main.elm"
5+ "build" : " elm make src/Main.elm --output=public/main.js "
66 },
77 "dependencies" : {
88 "elm" : " ^0.19.1-6"
99 }
10- }
10+ }
Original file line number Diff line number Diff line change 1+ <!DOCTYPE HTML>
2+ < html >
3+
4+ < head >
5+ < meta charset ="UTF-8 ">
6+ < title > Guida</ title >
7+ < link rel ="stylesheet " href ="main.css ">
8+ < script src ="main.js "> </ script >
9+ </ head >
10+
11+ < body >
12+ < script > var app = Elm . Main . init ( ) ; </ script >
13+ </ body >
14+
15+ </ html >
Original file line number Diff line number Diff line change 1+ * {
2+ margin : 0 ;
3+ padding : 0 ;
4+ box-sizing : border-box;
5+ }
Original file line number Diff line number Diff line change @@ -4,10 +4,17 @@ import Browser
44import Html
55
66
7- main : Program () {} ()
7+ main : Program () () ()
88main =
9- Browser . sandbox
10- { init = {}
11- , update = \ _ _ -> {}
12- , view = \ _ -> Html . h1 [] [ Html . text " Hello Guida!" ]
9+ Browser . document
10+ { init = \ _ -> ( () , Cmd . none )
11+ , view =
12+ \ _ ->
13+ { title = " Guida"
14+ , body =
15+ [ Html . h1 [] [ Html . text " Hello Guida!" ]
16+ ]
17+ }
18+ , update = \ _ _ -> ( () , Cmd . none )
19+ , subscriptions = \ _ -> Sub . none
1320 }
You can’t perform that action at this time.
0 commit comments