From c2c9f71ea4a70af79f7d358ba07cbe2f085efaa8 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Thu, 22 Feb 2024 03:29:13 -0600 Subject: [PATCH] Allow action to push to gh-pages Create repo that uses github token to acquire permission to push. --- .github/workflows/build-docs.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index ae990c4..0908e8d 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -73,8 +73,9 @@ jobs: - name: Checkout gh-pages if: ${{ !github.event.pull_request && github.event.action != 'closed'}} run: | + git remote add tokened_docs https://IntelPython:${{ secrets.GITHUB_TOKEN }}@github.com/IntelPython/dpctl.git git fetch --all - git checkout gh-pages + git checkout --track tokened_docs/gh-pages - name: 'Copy build to root' if: ${{ !github.event.pull_request && github.event.action != 'closed'}} run: | @@ -89,5 +90,5 @@ jobs: - name: Publish changes if: ${{ success() && !github.event.pull_request && github.event.action != 'closed'}} run: | - git push origin gh-pages + git push tokened_docs gh-pages timeout-minutes: 10