File tree 2 files changed +52
-3
lines changed
2 files changed +52
-3
lines changed Original file line number Diff line number Diff line change
1
+ # Simple workflow for deploying static content to GitHub Pages
2
+ name : Build & Deploy to Github Pages
3
+
4
+ on :
5
+ # Runs on pushes targeting the default branch
6
+ push :
7
+ branches : ["master"]
8
+
9
+ # Allows you to run this workflow manually from the Actions tab
10
+ workflow_dispatch :
11
+
12
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13
+ permissions :
14
+ contents : read
15
+ pages : write
16
+ id-token : write
17
+
18
+ # Allow one concurrent deployment
19
+ concurrency :
20
+ group : " pages"
21
+ cancel-in-progress : true
22
+
23
+ jobs :
24
+ build-and-deploy :
25
+ environment :
26
+ name : github-pages
27
+ url : ${{ steps.deployment.outputs.page_url }}
28
+ concurrency : ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
29
+ runs-on : ubuntu-latest
30
+ steps :
31
+ - name : Checkout 🛎️
32
+ uses : actions/checkout@v3
33
+
34
+ - name : Configure GitHub Pages 📄
35
+ uses : actions/configure-pages@v2
36
+
37
+ - name : Install and Build 🛠️
38
+ run : |
39
+ npm ci
40
+ npm run build
41
+
42
+ - name : Upload artifacts 📁
43
+ uses : actions/upload-pages-artifact@v1
44
+ with :
45
+ path : .vitepress/dist
46
+
47
+ - name : Deploy to GitHub Pages 🚀
48
+ id : deployment
49
+ uses : actions/deploy-pages@v1
Original file line number Diff line number Diff line change 1
1
{
2
2
"scripts" : {
3
- "docs: dev" : " vitepress dev" ,
4
- "docs: build" : " vitepress build" ,
5
- "docs: preview" : " vitepress preview"
3
+ "dev" : " vitepress dev" ,
4
+ "build" : " vitepress build" ,
5
+ "preview" : " vitepress preview"
6
6
},
7
7
"devDependencies" : {
8
8
"vitepress" : " ^1.5.0"
You can’t perform that action at this time.
0 commit comments