Skip to content

Commit

Permalink
fix: add download artifact setup
Browse files Browse the repository at this point in the history
  • Loading branch information
liukangtian committed Dec 15, 2024
1 parent 26c9a76 commit f4d78ae
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ jobs:
run: |
echo "Listing files in ./dist:"
ls -R ./dist
- name: Find and remove symlinks
run: find ./dist -type l -exec rm -f {} \;
# 上传构建文件为 artifact
- name: Upload artifact for deployment
Expand All @@ -51,19 +49,21 @@ jobs:
id-token: write

steps:
# 调试:列出 workspace 中的文件
- name: Debug - List uploaded artifacts
run: |
echo "Listing uploaded artifact files:"
ls -R $GITHUB_WORKSPACE
- name: Check if GITHUB_TOKEN is valid
run: echo ${{ secrets.TEST_GITHUB_TOKEN }} | base64
# 下载上传的 artifact
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: github-pages

# 调试:列出下载后的文件
- name: Debug - List downloaded files
run: |
echo "Listing downloaded artifact files:"
ls -R ./github-pages
# 部署到 GitHub Pages
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.TEST_GITHUB_TOKEN }}
publish_dir: ./dist
publish_dir: ./github-pages/dist # 这个目录需要指向下载后的 dist

0 comments on commit f4d78ae

Please sign in to comment.