updates #5
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 Folders | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'docs/docs/**' | |
| - 'docs/sidebars.ts' | |
| jobs: | |
| sync: | |
| # DISABLED FOR NOW | |
| if: false | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source repository | |
| uses: actions/checkout@v5 | |
| with: | |
| path: source-repo | |
| - name: Checkout target repository | |
| uses: actions/checkout@v5 | |
| with: | |
| repository: opsmill/infrahub-docs | |
| token: ${{ github.token }} | |
| path: target-repo | |
| - name: Sync folders | |
| run: | | |
| rm -rf target-repo/docs/docs-demo2/* | |
| rm -f target-repo/docs/sidebars-demo.ts | |
| cp -r source-repo/docs/docs/* target-repo/docs/docs-demo2/ | |
| cp source-repo/docs/sidebars.ts target-repo/docs/sidebars-demo2.ts | |
| cd target-repo | |
| git config user.name github-actions | |
| git config user.email github-actions@github.com | |
| git add . | |
| if ! (git diff --quiet && git diff --staged --quiet); then git commit -m "Sync docs from infrahub-demo repo" && git push; fi |