Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
phyuany authored Nov 6, 2024
1 parent d6bd695 commit e609ce4
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- main # 监听 main 分支的 push 事件

jobs:
# Build job
build:
runs-on: ubuntu-latest

Expand All @@ -30,9 +31,21 @@ jobs:
run: |
gulp dist --codelabs-dir=codelabs # 运行打包命令
# Step 5 (Alternative for GitHub Pages):
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
# Step 5: Upload dist folder
- name: Upload static files as artifact
id: deployment
uses: actions/upload-pages-artifact@v3 # or specific "vX.X.X" version tag for this action
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
path: dist/

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1

0 comments on commit e609ce4

Please sign in to comment.