File tree 1 file changed +47
-0
lines changed
1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Vite Github Pages Deploy
2
+
3
+ # Controls when the workflow will run
4
+ on :
5
+ # Triggers the workflow on push or pull request events but only for the "main" branch
6
+ push :
7
+ branches : ["main"]
8
+
9
+ # Allows you to run this workflow manually from the Actions tab
10
+ workflow_dispatch :
11
+
12
+ permissions :
13
+ contents : read
14
+ pages : write
15
+ id-token : write
16
+
17
+ jobs :
18
+ # Build job
19
+ build :
20
+ runs-on : ubuntu-latest
21
+ steps :
22
+ - name : Checkout
23
+ uses : actions/checkout@v3
24
+ - name : Setup Pages
25
+ uses : actions/configure-pages@v3
26
+ - name : Install
27
+ run : npm i
28
+ - name : Build
29
+ run : npm run build
30
+ env :
31
+ NODE_ENV : production
32
+ - name : Upload artifact
33
+ uses : actions/upload-pages-artifact@v1
34
+ with :
35
+ path : ./dist
36
+
37
+ # Deployment job
38
+ deploy :
39
+ environment :
40
+ name : github-pages
41
+ url : ${{ steps.deployment.outputs.page_url }}
42
+ runs-on : ubuntu-latest
43
+ needs : build
44
+ steps :
45
+ - name : Deploy to GitHub Pages
46
+ id : deployment
47
+ uses : actions/deploy-pages@v2
You can’t perform that action at this time.
0 commit comments