Repository navigation
feat: 添加 banner.svg 并更新 README.md #19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy to GitHub Pages | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "starlight/**" | |
| - ".github/workflows/deploy.yml" | |
| repository_dispatch: | |
| types: [content-updated] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Main (Scripts & Starlight) | |
| uses: actions/checkout@v6 | |
| - name: Checkout Content | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: content | |
| path: content | |
| fetch-depth: 0 | |
| - name: Sync Content to Starlight | |
| run: | | |
| TARGET="starlight/src/content/docs" | |
| SOURCE="content/docs" | |
| mkdir -p "$TARGET" | |
| if [ -d "$SOURCE" ]; then | |
| cp -r "$SOURCE"/* "$TARGET"/ | |
| fi | |
| echo "Content synced:" | |
| ls -R starlight/src/content/docs | head -n 30 | |
| - name: Install, build, and upload site | |
| uses: withastro/action@v5 | |
| with: | |
| path: starlight | |
| 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 |