v4.11.5 #79
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 # zizmor: ignore[artipacked] | |
| with: | |
| repository: filamentphp/mintlify-docs | |
| token: ${{ secrets.GH_ACCESS_TOKEN }} | |
| path: docs | |
| - name: Set up Node | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.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 |