Add workflow to sync src to docs #1
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 src to docs | |
| on: | |
| push: | |
| branches: [ production ] | |
| paths: | |
| - 'src/**' | |
| - '.github/workflows/sync-docs.yml' | |
| permissions: | |
| contents: write | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Mirror src → docs (delete removed files) | |
| run: | | |
| rsync -av --delete src/ docs/ | |
| - name: Ensure .nojekyll exists | |
| run: | | |
| touch docs/.nojekyll | |
| - name: Commit changes to docs | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: "Sync docs from src" | |
| file_pattern: docs/** |