Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/sync-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Sync docs to compass-docs

on:
push:
branches: [main]
paths:
- 'docs/**'
workflow_dispatch:

permissions:
contents: read

jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/checkout@v4
with:
repository: SwitchbackTech/compass-docs
token: ${{ secrets.COMPASS_DOCS_TOKEN }}
path: compass-docs

- name: Sync docs
run: rsync -av --delete docs/ compass-docs/docs/

- name: Commit and push if changed
working-directory: compass-docs
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add -A
git diff --staged --quiet || git commit -m "sync: update docs from compass"
git push
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Loading