-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
995ef28
commit 466c000
Showing
1 changed file
with
6 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
|
@@ -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: | | ||
|
@@ -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 |