File tree Expand file tree Collapse file tree 2 files changed +41
-26
lines changed
Expand file tree Collapse file tree 2 files changed +41
-26
lines changed Original file line number Diff line number Diff line change 66 pull_request :
77 branches : [ main ]
88
9+ permissions :
10+ contents : read
11+ pages : write
12+ id-token : write
13+
14+ concurrency :
15+ group : " pages"
16+ cancel-in-progress : false
17+
918jobs :
10- build-and-deploy :
19+ build :
1120 runs-on : ubuntu-latest
12-
1321 steps :
14- - name : Checkout
15- uses : actions/checkout@v4
22+ - name : Checkout
23+ uses : actions/checkout@v4
1624
17- - name : Setup Node.js
18- uses : actions/setup-node@v4
19- with :
20- node-version : ' 18'
21- cache : ' npm'
22-
23- - name : Install dependencies
24- run : npm ci
25+ - name : Setup Node.js
26+ uses : actions/setup-node@v4
27+ with :
28+ node-version : ' 18'
29+ cache : ' npm'
2530
26- - name : Run linting
27- run : npm run lint
31+ - name : Install dependencies
32+ run : npm ci
2833
29- - name : Type check
30- run : npm run type-check
34+ - name : Build
35+ run : npm run build
3136
32- - name : Build
33- run : npm run build
37+ - name : Setup Pages
38+ uses : actions/configure-pages@v4
3439
35- - name : Deploy to GitHub Pages
36- if : github.ref == 'refs/heads/main'
37- uses : peaceiris/actions-gh-pages@v3
38- with :
39- github_token : ${{ secrets.GITHUB_TOKEN }}
40- publish_dir : ./dist
40+ - name : Upload artifact
41+ uses : actions/upload-pages-artifact@v3
42+ with :
43+ path : ' ./dist'
44+
45+ deploy :
46+ environment :
47+ name : github-pages
48+ url : ${{ steps.deployment.outputs.page_url }}
49+ runs-on : ubuntu-latest
50+ needs : build
51+ if : github.ref == 'refs/heads/main'
52+ steps :
53+ - name : Deploy to GitHub Pages
54+ id : deployment
55+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change 3333 },
3434 "repository" : {
3535 "type" : " git" ,
36- "url" : " https://github.com/YOUR_USERNAME /smartwrite-free.git"
36+ "url" : " https://github.com/licjon /smartwrite-free.git"
3737 },
38- "homepage" : " https://YOUR_USERNAME .github.io/smartwrite-free"
38+ "homepage" : " https://licjon .github.io/smartwrite-free"
3939}
You can’t perform that action at this time.
0 commit comments