File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed
Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ name : 部署Office网站到GitHub Pages
2+
3+ on :
4+ push :
5+ branches :
6+ - main # 当推送到main分支时触发
7+
8+ jobs :
9+ build-and-deploy :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : 检出代码
13+ uses : actions/checkout@v3
14+
15+ - name : 设置Node.js环境
16+ uses : actions/setup-node@v3
17+ with :
18+ node-version : 18
19+ cache : ' npm'
20+ cache-dependency-path : ' office-website/package-lock.json'
21+
22+ - name : 安装依赖
23+ run : |
24+ cd office-website
25+ npm ci
26+
27+ - name : 构建项目
28+ run : |
29+ cd office-website
30+ npm run build
31+
32+ - name : 部署到GitHub Pages
33+ uses : peaceiris/actions-gh-pages@v3
34+ with :
35+ github_token : ${{ secrets.GITHUB_TOKEN }}
36+ publish_dir : ./office-website/build
37+ cname : # 如果你有自定义域名,可以在这里设置
Original file line number Diff line number Diff line change 11{
2+ "homepage" : " https://jsrei.github.io/typescript-userscript-template" ,
23 "scripts" : {
34 "start" : " react-scripts start" ,
45 "build" : " react-scripts build" ,
You can’t perform that action at this time.
0 commit comments