Skip to content

Commit

Permalink
Update action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
manoelcampos authored Aug 15, 2020
1 parent 995ef28 commit 466c000
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ runs:
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
shell: bash

- name: Asciidoctor Setup
run: sudo apt-get install asciidoctor -y
shell: bash

# Avoids keeping the commit history for the gh-pages branch,
# so that such a branch keeps only the last commit.
Expand All @@ -26,9 +28,11 @@ runs:
git branch -D gh-pages 1>/dev/null 2>/dev/null || true
git log | head -n 1 | cut -d' ' -f2 > /tmp/commit-hash.txt
git checkout --orphan gh-pages master 1>/dev/null
shell: bash

#- name: Checking out the gh-pages branch, keeping its history
# run: git checkout master -B gh-pages 1>/dev/null
# shell: bash

- name: Converting AsciiDoc files to HTML
run: |
Expand All @@ -39,10 +43,12 @@ runs:
for FILE in `find . -name "*.html"`; do
git add -f "$FILE";
done
shell: bash

- name: Commiting to gh-pages and pushing changes
run: |
MSG="Build AsciiDoc Files for GitHub Pages from commit `cat /tmp/commit-hash.txt`"
echo $MSG
git commit -m "$MSG" 1>/dev/null
git push -f --quiet --set-upstream origin gh-pages 1>/dev/null
shell: bash

0 comments on commit 466c000

Please sign in to comment.