Merge docs into static-php-cli repo (#492)

* Move docs to here

* Move docs to here

* Modify old docs links
This commit is contained in:
Jerry Ma
2024-07-01 10:29:31 +08:00
committed by GitHub
parent eb00e0012f
commit b31539f0f4
51 changed files with 5172 additions and 28 deletions

View File

@@ -1,36 +1,31 @@
name: Update Docs Config
name: Docs Auto Deploy
on:
push:
branches:
- main
paths:
- 'config/**.json'
- 'docs/**'
- 'package.json'
jobs:
update-docs-config:
name: "Update Docs Config"
build:
name: Deploy docs
runs-on: ubuntu-latest
if: github.repository == 'crazywhalecc/static-php-cli'
steps:
- name: "Checkout static-php-cli"
- name: Checkout master
uses: actions/checkout@v4
- name: "Checkout static-php-cli-docs"
uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
repository: static-php/static-php-cli-docs
ref: master
token: ${{ secrets.DOCS_REPO_TOKEN }}
path: static-php-cli-docs
node-version: 18
cache: yarn
- name: "Set up Git"
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
- run: yarn install --frozen-lockfile
- name: "Copy Config Files"
run: cp -r config/* static-php-cli-docs/docs/.vitepress/config/
run: cp -r config/* docs/.vitepress/config/
- name: "Install PHP for official runners"
uses: "shivammathur/setup-php@v2"
@@ -58,11 +53,13 @@ jobs:
- name: "Generate Extension Support List"
run: |
bin/spc dev:gen-ext-docs > static-php-cli-docs/docs/extensions.md
bin/spc dev:gen-ext-docs > docs/extensions.md
- name: "Commit and Push Changes"
run: |
cd static-php-cli-docs
git add -A
git commit -m "Sync config files from main"
git push origin master
- name: Build
run: yarn docs:build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/.vitepress/dist