5b303e2e6d
Bumps the github-actions group with 7 updates: | Package | From | To | | --- | --- | --- | | [actions/setup-node](https://github.com/actions/setup-node) | `2` | `6` | | [actions/checkout](https://github.com/actions/checkout) | `4` | `6` | | [actions/setup-python](https://github.com/actions/setup-python) | `5` | `6` | | [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) | `3` | `4` | | [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `3` | `4` | | [docker/login-action](https://github.com/docker/login-action) | `3` | `4` | | [docker/build-push-action](https://github.com/docker/build-push-action) | `6` | `7` | Updates `actions/setup-node` from 2 to 6 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v2...v6) Updates `actions/checkout` from 4 to 6 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v6) Updates `actions/setup-python` from 5 to 6 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v5...v6) Updates `docker/setup-qemu-action` from 3 to 4 - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](https://github.com/docker/setup-qemu-action/compare/v3...v4) Updates `docker/setup-buildx-action` from 3 to 4 - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v3...v4) Updates `docker/login-action` from 3 to 4 - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v3...v4) Updates `docker/build-push-action` from 6 to 7 - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: actions/setup-python dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: docker/setup-qemu-action dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: docker/setup-buildx-action dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: docker/login-action dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: docker/build-push-action dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
69 lines
2.0 KiB
YAML
69 lines
2.0 KiB
YAML
name: sync wiki
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- '.github/workflows/sync-wiki.yml'
|
|
- 'docs/scripts/sync_docs_to_wiki.py'
|
|
- 'docs/tests/test_sync_docs_to_wiki.py'
|
|
- 'docs/zh/**'
|
|
- 'docs/en/**'
|
|
|
|
concurrency:
|
|
group: sync-wiki-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
sync:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Validate manual ref
|
|
if: github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/master'
|
|
run: |
|
|
echo "This workflow only publishes from refs/heads/master. Re-run it from the master branch."
|
|
exit 1
|
|
|
|
- name: Check out docs repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Run sync unit tests
|
|
working-directory: docs
|
|
run: python -m unittest discover -s tests -p 'test_sync_docs_to_wiki.py' -v
|
|
|
|
- name: Validate internal doc links
|
|
run: python docs/scripts/sync_docs_to_wiki.py --source-root docs --check-links-only
|
|
|
|
- name: Clone AstrBot wiki
|
|
env:
|
|
WIKI_TOKEN: ${{ secrets.ASTRBOT_WIKI_TOKEN }}
|
|
run: |
|
|
test -n "$WIKI_TOKEN"
|
|
git clone "https://x-access-token:${WIKI_TOKEN}@github.com/AstrBotDevs/AstrBot.wiki.git" wiki
|
|
|
|
- name: Generate wiki pages
|
|
run: python docs/scripts/sync_docs_to_wiki.py --source-root docs --wiki-root wiki
|
|
|
|
- name: Commit and push wiki changes
|
|
working-directory: wiki
|
|
run: |
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git add .
|
|
if git diff --cached --quiet; then
|
|
echo "No wiki changes to push"
|
|
exit 0
|
|
fi
|
|
git commit -m "docs: sync wiki from AstrBot-1/docs"
|
|
git push
|