Skip to content

Deploy Document

Deploy Document #6

name: Deploy Document
on:
workflow_dispatch
concurrency:
group: "gh-branch-workflow" # 唯一标识符,确保只运行一个实例
cancel-in-progress: false # 不取消正在运行的实例,后续触发需要等待当前实例完成
jobs:
push-code:
runs-on: ubuntu-latest
permissions:
content: write # 给予写权限,允许推送代码

Check failure on line 13 in .github/workflows/deploy-document.yml

View workflow run for this annotation

GitHub Actions / Deploy Document

Invalid workflow file

The workflow is not valid. .github/workflows/deploy-document.yml (Line: 13, Col: 7): Unexpected value 'content'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
token: ${{ secrets.REPO_PUSH_TOKEN }}
- name: Get branch info
run: git branch --show-current
- name: Set up Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Rush Install
run: node common/scripts/install-run-rush.js install
- name: Rush build
run: node common/scripts/install-run-rush.js build
- name: Generate auto-docs
run: |
cd apps/docs
npm run docs
- name: build docs
run: |
cd apps/docs
npm run build
- name: Check Path
run: pwd
- name: Replace docs
run: |
rm -rf docs
mv apps/docs/doc_build docs
ls -al
- name: Commit and Push
run: |
git add .
git commit -m 'chore: update docs' -n
git push
env:
REPO_PUSH_TOKEN: ${{ secrets.REPO_PUSH_TOKEN }}