File tree 1 file changed +6
-26
lines changed
1 file changed +6
-26
lines changed Original file line number Diff line number Diff line change 1
- name : Deploy Vite App to GitHub Pages
1
+ name : Deploy Vite React to GitHub Pages
2
2
3
3
on :
4
4
push :
5
5
branches : [main]
6
6
workflow_dispatch :
7
7
8
- # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9
- permissions :
10
- contents : read
11
- pages : write
12
- id-token : write
13
-
14
- # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
15
- concurrency :
16
- group : ' pages'
17
- cancel-in-progress : false
18
-
19
8
jobs :
20
9
build-and-deploy :
21
- environment :
22
- name : github-pages
23
- url : ${{ steps.deployment.outputs.page_url }}
24
10
runs-on : ubuntu-latest
25
11
26
12
steps :
@@ -30,22 +16,16 @@ jobs:
30
16
- name : Set up Node.js
31
17
uses : actions/setup-node@v3
32
18
with :
33
- node-version : ' 18 '
19
+ node-version : 18
34
20
35
21
- name : Install dependencies
36
22
run : npm ci
37
23
38
24
- name : Build
39
25
run : npm run build
40
26
41
- - name : Setup Pages
42
- uses : actions/configure-pages@v3
43
-
44
- - name : Upload artifact
45
- uses : actions/upload-pages-artifact@v2
46
- with :
47
- path : ' ./dist'
48
-
49
27
- name : Deploy to GitHub Pages
50
- id : deployment
51
- uses : actions/deploy-pages@v2
28
+ uses : peaceiris/actions-gh-pages@v3
29
+ with :
30
+ github_token : ${{ secrets.GITHUB_TOKEN }}
31
+ publish_dir : ./dist
You can’t perform that action at this time.
0 commit comments