@@ -3,44 +3,53 @@ name: Deploy
33on :
44 push :
55 branches : [main]
6+ # Allows you to run this workflow manually from the Actions tab
7+ workflow_dispatch :
8+
9+ # Allow one concurrent deployment
10+ concurrency :
11+ group : ' pages'
12+ cancel-in-progress : true
13+
14+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
15+ permissions :
16+ contents : read
17+ pages : write
18+ id-token : write
619
720jobs :
8- # Build job
9- build :
21+ deploy :
22+ environment :
23+ name : github-pages
24+ url : ${{ steps.deployment.outputs.page_url }}
25+
1026 runs-on : ubuntu-latest
27+
1128 steps :
1229 - name : Checkout
1330 uses : actions/checkout@v4
14- - name : Setup Pages
15- id : pages
16- uses : actions/configure-pages@v3
17- - uses : actions/setup-node@v4
31+ - run : echo ::set-output name=NODE_VERSION::$(cat web-app/.nvmrc)
32+ id : nvm
33+ - name : Set up Node
34+ uses : actions/setup-node@v4
1835 with :
19- node-version : 20.x
20- - run : npm ci
36+ node-version : ${{ steps.nvm.outputs.NODE_VERSION }}
37+ cache : ' npm'
38+ - name : Install dependencies
39+ run : npm ci
2140 working-directory : web-app
22- - run : npx tsx generate-svg-icons-sprite.ts
41+ - name : Generate SVG icons sprite
42+ run : npx tsx generate-svg-icons-sprite.ts
2343 working-directory : web-app
24- - run : npm run build
44+ - name : Build
45+ run : npm run build
2546 working-directory : web-app
47+ - name : Setup Pages
48+ uses : actions/configure-pages@v5
2649 - name : Upload artifact
2750 uses : actions/upload-pages-artifact@v3
2851 with :
2952 path : ' web-app/build/client'
30-
31- # Deployment job
32- deploy :
33- # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
34- permissions :
35- contents : read
36- pages : write
37- id-token : write
38- environment :
39- name : github-pages
40- url : https://heiso.github.io/macrolev
41- runs-on : ubuntu-latest
42- needs : build
43- steps :
4453 - name : Deploy to GitHub Pages
4554 id : deployment
4655 uses : actions/deploy-pages@v4
0 commit comments