Skip to content

Commit

Permalink
chore: setting git pages deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
jiaziling committed Sep 14, 2024
1 parent 5eb6e61 commit 8a50e8a
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy to GitHub Pages

on:
push:
branches: [dev-jzl]
workflow_dispatch:

# 允许 job 克隆 repo 并创建一个 page deployment
permissions:
contents: read
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@v4
- name: Install dependencies
run: npm install
- name: Build your project
run: npm run docs:build

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs-dist

0 comments on commit 8a50e8a

Please sign in to comment.