Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
costateixeira authored Jul 19, 2023
1 parent 0594d40 commit f70089f
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,20 @@ jobs:
run: echo ${GITHUB_REF##*/}
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# - name: Create gh-pages branch if it doesn't exist
# uses: christopherdavenport/create-ghpages-ifnotexists@v1
- name: Create gh-pages branch if it doesn't exist
run: |
git fetch origin
exists=`git show-ref refs/heads/gh-pages`
if [ -n "$exists" ]; then
echo 'gh-pages branch exists';
else
echo 'gh-pages branch does not exist, creating it';
git checkout --orphan gh-pages
git reset --hard
git commit --allow-empty -m "Initializing gh-pages branch"
git push origin gh-pages
git checkout ${GITHUB_REF##*/}
fi
- name: Update the image to the latest publisher
uses: docker://hl7fhir/ig-publisher-base:latest
with:
Expand Down

0 comments on commit f70089f

Please sign in to comment.