fix: 更新部署文档工作流,添加下载工件步骤

This commit is contained in:
MKStoler1024 2025-01-31 17:57:27 +00:00
parent 370653345e
commit 9da5df60f2

View File

@ -1,4 +1,3 @@
name: 部署文档 name: 部署文档
on: on:
@ -25,7 +24,6 @@ jobs:
with: with:
version: 9.9.0+sha512.60c18acd138bff695d339be6ad13f7e936eea6745660d4cc4a776d5247c540d0edee1a563695c183a66eb917ef88f2b4feb1fc25f32a7adcadc7aaf3438e99c1 version: 9.9.0+sha512.60c18acd138bff695d339be6ad13f7e936eea6745660d4cc4a776d5247c540d0edee1a563695c183a66eb917ef88f2b4feb1fc25f32a7adcadc7aaf3438e99c1
- name: 设置 Node.js - name: 设置 Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
@ -66,22 +64,22 @@ jobs:
if-no-files-found: error if-no-files-found: error
deploy: deploy:
# Add a dependency to the build job
needs: build needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions: permissions:
pages: write # to deploy to Pages pages: write
id-token: write # to verify the deployment originates from an appropriate source id-token: write
# Deploy to the github-pages environment
environment: environment:
name: github-pages name: github-pages
url: ${{ steps.deployment.outputs.page_url }} url: ${{ steps.deployment.outputs.page_url }}
# Specify runner + deployment step
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: 下载工件
uses: actions/download-artifact@v4
with:
name: github-pages
path: ${{ runner.temp }}
- name: 部署到 GitHub Pages - name: 部署到 GitHub Pages
id: deployment id: deployment
uses: actions/deploy-pages@v2 # or the latest "vX.X.X" version tag for this action uses: actions/deploy-pages@v2
with:
artifact_path: ${{ runner.temp }}/artifact.tar