Files
filament/.github/workflows/sync-docs.yml
dependabot[bot] bb25f0c73f chore(deps): bump actions/setup-node from 6.4.0 to 7.0.0 (#20282)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 6.4.0 to 7.0.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e...820762786026740c76f36085b0efc47a31fe5020)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-27 18:23:33 +01:00

54 lines
1.8 KiB
YAML

name: sync-docs
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: read
jobs:
sync-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout docs repository
# persist-credentials: true is required so the final `git push` to
# filamentphp/mintlify-docs uses the GH_ACCESS_TOKEN written into
# docs/.git/config. Subsequent steps in this job are maintainer-controlled.
# zizmor: ignore[artipacked]
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: filamentphp/mintlify-docs
token: ${{ secrets.GH_ACCESS_TOKEN }}
path: docs
- name: Set up Node
# setup-node's default npm cache is harmless here: the job only runs `node sync.js`
# (read-only against the docs repo's working tree) and then pushes to a separate
# repo via PAT. No cache contents reach a release-distributed artifact, so the
# cache-poisoning vector zizmor flags doesn't apply.
# zizmor: ignore[cache-poisoning]
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '20'
- name: Run sync script
working-directory: docs
run: node sync.js
- name: Commit and push changes
working-directory: docs
env:
RELEASE_TAG: ${{ github.event.release.tag_name }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add -A
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "Sync documentation from release ${RELEASE_TAG}"
git push
fi