diff --git a/.github/workflows/push_sdk_docs_to_dev_portal.yaml b/.github/workflows/push_sdk_docs_to_dev_portal.yaml index 7fdfe9658..5e930c79b 100644 --- a/.github/workflows/push_sdk_docs_to_dev_portal.yaml +++ b/.github/workflows/push_sdk_docs_to_dev_portal.yaml @@ -23,6 +23,14 @@ jobs: repository: sailpoint-oss/developer.sailpoint.com path: developer-community ref: main + token: ${{ secrets.DEVREL_SERVICE_TOKEN }} + fetch-depth: 0 + + - name: Sync local to remote main + working-directory: developer-community + run: | + git fetch origin main + git reset --hard origin/main - name: Install rsync run: sudo apt update && sudo apt install -y rsync grsync @@ -50,8 +58,8 @@ jobs: rsync -av python-sdk/sailpoint/v2025/docs/Examples/python_code_examples_overlay.yaml developer-community/static/code-examples/v2025/ - name: Check for changes and commit if any + working-directory: developer-community run: | - cd developer-community if git diff --quiet; then echo "No changes to commit." exit 0 @@ -61,8 +69,7 @@ jobs: git config --local user.name "developer-relations-sp" git add . git commit -m "Update python SDK docs: ${{ github.run_id }}" - git remote set-url origin https://${{ secrets.DEVREL_SERVICE_TOKEN }}@github.com/sailpoint-oss/developer.sailpoint.com.git - git push + git push origin main publish-failure: name: Notify on failure