Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge docs into static-php-cli repo #492

Merged
merged 3 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
> If your PR involves the changes mentioned below and completed the action, please tick the corresponding option.
> If a modification is not involved, please skip it directly.

- [ ] If it's a extension or dependency update, make sure adding related extensions in `src/global/test-extensions.php`.
- [ ] If you changed the behavior of static-php-cli, add docs in [static-php/static-php-cli-docs](https://github.com/static-php/static-php-cli-docs) .
- [ ] If you updated `config/xxxx.json` content, run `bin/spc dev:sort-config xxx`.
- [ ] If it's an extension or dependency update, make sure adding related extensions in `src/global/test-extensions.php`.
- [ ] If you changed the behavior of static-php-cli, update docs in `./docs/`.
- [ ] If you updated `config/xxx.json` content, run `bin/spc dev:sort-config xxx`.
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,11 @@ docker/source/

# default test directory
/tests/var/

# VitePress
/node_modules/
/docs/.vitepress/dist/
/docs/.vitepress/cache/
package-lock.json
pnpm-lock.yaml
yarn.lock
2 changes: 1 addition & 1 deletion README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ bin/spc micro:combine my-app.phar -I "memory_limit=4G" -I "disable_functions=sys

另外,添加新扩展的贡献方式,可以参考下方 `进阶`。

如果你想贡献文档内容,请到项目仓库 [static-php/static-php-cli-docs](https://github.com/static-php/static-php-cli-docs) 贡献
如果你想贡献文档内容,请直接修改 `docs/` 目录

## 赞助本项目

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ For an advanced example of how to use this feature, take a look at [how to use i
If the extension you need is missing, you can create an issue.
If you are familiar with this project, you are also welcome to initiate a pull request.

If you want to contribute documentation, please go to [static-php/static-php-cli-docs](https://github.com/static-php/static-php-cli-docs).
If you want to contribute documentation, please just edit in `docs/`.

Now there is a [static-php](https://github.com/static-php) organization, which is used to store the repo related to the project.

Expand Down
Loading
Loading