Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
costateixeira authored Aug 16, 2023
1 parent 13fc96c commit 27fb483
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,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
# 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: Create gh-pages branch if it doesn't exist
run: |
git fetch origin
exists=$(git ls-remote --heads origin gh-pages | wc -l)
if [ "$exists" -eq "0" ]; then
echo 'gh-pages branch does not exist, creating it'
git checkout --orphan gh-pages
git rm -rf . # Remove all files and directories from the orphaned branch
git commit --allow-empty -m "Initializing empty gh-pages branch"
git push origin gh-pages
else
echo 'gh-pages branch exists'
fi
- name: Update the image to the latest publisher
uses: docker://hl7fhir/ig-publisher-base:latest
with:
Expand Down

0 comments on commit 27fb483

Please sign in to comment.