Skip to content

Commit

Permalink
Skip the run on forks without the 'gh-pages' branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
vaitkus committed Apr 8, 2024
1 parent 0e3b485 commit a7bd202
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ on:
jobs:

build_html:
if: github.repository == 'Materials-Consortia/OPTIMADE'

runs-on: ubuntu-latest

env:
Expand Down Expand Up @@ -38,6 +36,9 @@ jobs:
- name: Commit to gh-pages
run: |
# Skip the run on forks without the 'gh-pages' branch
git ls-remote --exit-code --heads origin refs/heads/gh-pages > /dev/null
test $? -eq 2 && exit 0
git fetch origin gh-pages
git checkout gh-pages
mkdir -p specification/develop
Expand Down

0 comments on commit a7bd202

Please sign in to comment.