Skip to content

Commit

Permalink
add some conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
skoudoro committed Sep 11, 2023
1 parent 4358fbc commit 02a9f4d
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,20 @@ on:
schedule:
- cron: '0 0 * * 1'

permissions: write-all

jobs:
deploy:
runs-on: ubuntu-latest
permissions: write-all
# contents: 'write'
# pull-requests: 'write'
# issues: 'write'
# id-token: 'write'
permissions:
contents: read
pull-requests: write
issues: write
env:
PR_PATH: pull/${{github.event.number}}
BASE_URL: https://dipy.github.io/dipy.org
steps:
- name: Comment on PR
uses: hasura/[email protected]
if: github.ref != 'refs/heads/master'
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
Expand Down Expand Up @@ -59,7 +56,7 @@ jobs:

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/master'
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/html
Expand All @@ -70,7 +67,7 @@ jobs:

- name: Deploy to PR preview
uses: peaceiris/actions-gh-pages@v3
if: github.ref != 'refs/heads/master'
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/html
Expand All @@ -82,7 +79,7 @@ jobs:

- name: Update comment
uses: hasura/[email protected]
if: github.ref != 'refs/heads/master'
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
Expand Down

0 comments on commit 02a9f4d

Please sign in to comment.