File tree Expand file tree Collapse file tree 4 files changed +20
-596
lines changed Expand file tree Collapse file tree 4 files changed +20
-596
lines changed Original file line number Diff line number Diff line change @@ -3,25 +3,32 @@ name: Deploy to GitHub Pages
3
3
on :
4
4
push :
5
5
branches :
6
- - main
6
+ - main # Usa 'master' se quello è il tuo branch principale
7
+
8
+ permissions :
9
+ contents : write # necessario per pushare su gh-pages
7
10
8
11
jobs :
9
- build-and- deploy :
12
+ build-deploy :
10
13
runs-on : ubuntu-latest
11
14
12
15
steps :
13
- - name : Checkout repo
14
- uses : actions/checkout@v3
16
+ - name : Checkout repository
17
+ uses : actions/checkout@v4
15
18
16
19
- name : Setup Node.js
17
- uses : actions/setup-node@v3
20
+ uses : actions/setup-node@v4
18
21
with :
19
22
node-version : 20
20
23
21
24
- name : Install dependencies
22
- run : npm install
25
+ run : npm ci
26
+
27
+ - name : Build project
28
+ run : npm run build
23
29
24
- - name : Build and Deploy
25
- run : npm run deploy
26
- env :
27
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
30
+ - name : Deploy to GitHub Pages
31
+ uses : peaceiris/actions-gh-pages@v4
32
+ with :
33
+ github_token : ${{ secrets.GITHUB_TOKEN }}
34
+ publish_dir : ./dist
You can’t perform that action at this time.
0 commit comments