Skip to content

Release 1.7.2

Release 1.7.2 #35

Workflow file for this run

---
# yamllint disable rule:truthy rule:line-length
name: Sync Folders
on:
push:
branches:
- stable
paths:
- 'docs/docs/**'
- 'docs/sidebars.ts'
pull_request:
branches:
- stable
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout source repository
uses: actions/checkout@v4
with:
path: source-repo
- name: Checkout target repository
uses: actions/checkout@v4
with:
repository: opsmill/infrahub-docs
token: ${{ secrets.PAT_TOKEN }}
path: target-repo
- name: Sync folders
run: |
rm -rf target-repo/docs/docs-python-sdk/*
rm -f target-repo/docs/sidebars-python-sdk.ts
rm -f target-repo/docs/sidebars-infrahubctl.ts
cp -r source-repo/docs/docs/* target-repo/docs/docs-python-sdk/
cp source-repo/docs/sidebars-infrahubctl.ts target-repo/docs/
cp source-repo/docs/sidebars-python-sdk.ts target-repo/docs/
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 doc Python SDK from infrahub repo" && git push; fi