mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-01 15:09:33 +08:00
40 lines
1003 B
YAML
40 lines
1003 B
YAML
name: sync-docs
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
sync-docs:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout docs repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: filamentphp/mintlify-docs
|
|
token: ${{ secrets.GH_ACCESS_TOKEN }}
|
|
path: docs
|
|
|
|
- name: Set up Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: Run sync script
|
|
working-directory: docs
|
|
run: node sync.js
|
|
|
|
- name: Commit and push changes
|
|
working-directory: docs
|
|
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 ${{ github.event.release.tag_name }}"
|
|
git push
|
|
fi
|