Skip to content

Commit

Permalink
chore: Update GitHub Actions workflow configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ATQQ committed Jan 21, 2024
1 parent 48276de commit 11cd1ca
Showing 1 changed file with 41 additions and 7 deletions.
48 changes: 41 additions & 7 deletions .github/workflows/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@ on:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
Expand Down Expand Up @@ -43,11 +58,30 @@ jobs:
echo ${{ github.workspace }}
cd ./packages/client
pnpm build:github
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./packages/client/dist # 文档打包产物的目录名就是build
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: ${{ github.event.head_commit.message }}`
source: ./packages/client/dist
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v3

# - name: Deploy to GitHub Pages
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./packages/client/dist # 文档打包产物的目录名就是build
# user_name: 'github-actions[bot]'
# user_email: 'github-actions[bot]@users.noreply.github.com'
# commit_message: ${{ github.event.head_commit.message }}`

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@v4

0 comments on commit 11cd1ca

Please sign in to comment.