mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-07-26 20:00:08 +00:00
165bb06132
Bumps the all-actions group with 2 updates in the / directory: [actions/checkout](https://github.com/actions/checkout) and [github/codeql-action](https://github.com/github/codeql-action). Updates `actions/checkout` from 6.0.2 to 6.0.3 - [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/de0fac2e4500dabe0009e67214ff5f5447ce83dd...df4cb1c069e1874edd31b4311f1884172cec0e10) Updates `github/codeql-action` from 4.36.0 to 4.36.1 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/7211b7c8077ea37d8641b6271f6a365a22a5fbfa...87557b9c84dde89fdd9b10e88954ac2f4248e463) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 6.0.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: all-actions - dependency-name: github/codeql-action dependency-version: 4.36.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: all-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Anso <dev@saelix.com>
66 lines
1.9 KiB
YAML
66 lines
1.9 KiB
YAML
name: Sync Docs
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- docs/**
|
|
- .github/workflows/docs-sync.yml
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: docs-sync-main
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
sync-docs:
|
|
name: Sync docs to sencho-docs
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
steps:
|
|
# Mint an installation token scoped to the mirror repository only. The
|
|
# default GITHUB_TOKEN cannot push to Studio-Saelix/sencho-docs.
|
|
- name: Generate GitHub App installation token
|
|
id: app-token
|
|
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
|
|
with:
|
|
app-id: ${{ secrets.APP_ID }}
|
|
private-key: ${{ secrets.APP_PRIVATE_KEY }}
|
|
owner: ${{ github.repository_owner }}
|
|
repositories: sencho-docs
|
|
permission-contents: write
|
|
|
|
- name: Checkout Sencho repo
|
|
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
|
with:
|
|
path: sencho
|
|
|
|
- name: Checkout sencho-docs repo
|
|
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
|
with:
|
|
repository: ${{ github.repository_owner }}/sencho-docs
|
|
token: ${{ steps.app-token.outputs.token }}
|
|
path: sencho-docs
|
|
|
|
- name: Copy /docs into sencho-docs root
|
|
run: rsync -av --delete --exclude='.git' sencho/docs/ sencho-docs/
|
|
|
|
- name: Commit and push to sencho-docs
|
|
working-directory: sencho-docs
|
|
run: |
|
|
git config user.email "docs-bot@sencho.io"
|
|
git config user.name "Sencho Docs Bot"
|
|
git add -A
|
|
|
|
if git diff --cached --quiet; then
|
|
echo "No docs changes to sync."
|
|
exit 0
|
|
fi
|
|
|
|
git commit -m "docs: sync from main@${{ github.sha }}"
|
|
git push origin HEAD:main
|