Skip to content

Commit

Permalink
Allow action to push to gh-pages
Browse files Browse the repository at this point in the history
Create repo that uses github token to acquire permission to push.
  • Loading branch information
oleksandr-pavlyk committed Feb 22, 2024
1 parent 5e2fd3b commit c2c9f71
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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

0 comments on commit c2c9f71

Please sign in to comment.