This commit is contained in:
Zuoling Rong
2025-02-02 19:59:57 +08:00
parent f0b6aadb86
commit 15b2b9a216
2 changed files with 30 additions and 13 deletions

View File

@@ -6,11 +6,22 @@ on:
- main
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
# 允许一个并发部署
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build-and-deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
@@ -27,9 +38,14 @@ jobs:
- name: Generate site
run: node generator.js
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
folder: .
branch: gh-pages
clean: true
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2