mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-02 22:35:43 +08:00
Update deployment workflow and enhance documentation build process
This commit is contained in:
35
.github/workflows/vitepress-deploy.yml
vendored
35
.github/workflows/vitepress-deploy.yml
vendored
@@ -1,8 +1,16 @@
|
||||
name: Docs Auto Deploy
|
||||
name: Docs build test and auto deploy
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ "v3" ]
|
||||
types: [ opened, synchronize, reopened ]
|
||||
paths:
|
||||
- 'config/**.yml'
|
||||
- 'docs/**'
|
||||
- 'package.json'
|
||||
- 'yarn.lock'
|
||||
- '.github/workflows/vitepress-deploy.yml'
|
||||
push:
|
||||
branches:
|
||||
- v3
|
||||
branches: [ "v3" ]
|
||||
paths:
|
||||
- 'config/**.yml'
|
||||
- 'docs/**'
|
||||
@@ -20,15 +28,8 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
cache: yarn
|
||||
|
||||
- run: yarn install --frozen-lockfile
|
||||
|
||||
- name: "Copy Config Files"
|
||||
run: |
|
||||
mkdir -p docs/.vitepress/config
|
||||
cp -r config/* docs/.vitepress/config/
|
||||
- run: npm install
|
||||
|
||||
- name: "Install PHP for official runners"
|
||||
uses: shivammathur/setup-php@v2
|
||||
@@ -55,19 +56,13 @@ jobs:
|
||||
- name: "Install Locked Dependencies"
|
||||
run: "composer install --no-interaction --no-progress"
|
||||
|
||||
# TODO: Uncomment when v3 gen commands are implemented
|
||||
# - name: "Generate Extension Support List"
|
||||
# run: |
|
||||
# bin/spc dev:gen-ext-docs > docs/en/guide/extensions.md
|
||||
# bin/spc dev:gen-ext-docs > docs/zh/guide/extensions.md
|
||||
# bin/spc dev:gen-ext-dep-docs > docs/en/guide/deps-map.md
|
||||
# bin/spc dev:gen-ext-dep-docs > docs/zh/guide/deps-map.md
|
||||
|
||||
- name: Build
|
||||
run: yarn docs:build
|
||||
run: npm run docs:build
|
||||
|
||||
# Deploy to GitHub Pages only when the workflow is triggered by a push to the v3 branch
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/v3'
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: docs/.vitepress/dist
|
||||
|
||||
Reference in New Issue
Block a user