Skip to content

Commit 2804876

Browse files
committed
update
1 parent d0c53d1 commit 2804876

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,27 @@ on:
1212
- cron: '0 2 * * *'
1313
workflow_dispatch: # 允许手动触发工作流
1414

15+
# Set permissions for GitHub Actions
16+
permissions:
17+
contents: read
18+
pages: write
19+
id-token: write
20+
21+
# Allow one concurrent deployment
22+
concurrency:
23+
group: "pages"
24+
cancel-in-progress: true
25+
1526
jobs:
1627
build-and-deploy:
1728
runs-on: ubuntu-latest
29+
environment:
30+
name: github-pages
31+
url: ${{ steps.deployment.outputs.page_url }}
32+
permissions:
33+
contents: read
34+
pages: write
35+
id-token: write
1836

1937
steps:
2038
- name: Checkout repository
@@ -34,6 +52,7 @@ jobs:
3452

3553
- name: Setup Pages
3654
uses: actions/configure-pages@v4
55+
continue-on-error: true # 允许错误继续执行
3756

3857
- name: Upload artifact
3958
uses: actions/upload-pages-artifact@v3
@@ -43,5 +62,6 @@ jobs:
4362
- name: Deploy to GitHub Pages
4463
if: github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
4564
uses: actions/deploy-pages@v4
65+
continue-on-error: true # 允许错误继续执行
4666
with:
4767
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)