File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy to GitHub Pages
2+
3+ on :
4+ # 每次推送到 `main` 分支时触发这个“工作流程”
5+ # 如果你使用了别的分支名,请按需将 `main` 替换成你的分支名
6+ push :
7+ branches : [main]
8+ # 允许你在 GitHub 上的 Actions 标签中手动触发此“工作流程”
9+ workflow_dispatch :
10+
11+ # 允许 job 克隆 repo 并创建一个 page deployment
12+ permissions :
13+ contents : read
14+ pages : write
15+ id-token : write
16+
17+ jobs :
18+ build :
19+ runs-on : ubuntu-latest
20+ steps :
21+ - name : Checkout your repository using git
22+ uses : actions/checkout@v4
23+ - name : Install, build, and upload your site
24+ uses : withastro/action@v3
25+ # with:
26+ # path: . # 存储库中 Astro 项目的根位置。(可选)
27+ # node-version: 20 # 用于构建站点的特定 Node.js 版本,默认为 20。(可选)
28+ # package-manager: pnpm@latest # 应使用哪个 Node.js 包管理器来安装依赖项和构建站点。会根据存储库中的 lockfile 自动检测。(可选)
29+
30+ deploy :
31+ needs : build
32+ runs-on : ubuntu-latest
33+ environment :
34+ name : github-pages
35+ url : ${{ steps.deployment.outputs.page_url }}
36+ steps :
37+ - name : Deploy to GitHub Pages
38+ id : deployment
39+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments