-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #117 from zdharma-continuum/ci-zsd
- Loading branch information
Showing
2 changed files
with
68 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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: π documentation | ||
on: [push, pull_request, workflow_dispatch] | ||
|
||
jobs: | ||
zshelldoc: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: π¦ Install zshelldoc | ||
run: | | ||
sudo apt-get install -y zsh | ||
git clone https://github.com/zdharma-continuum/zshelldoc.git /tmp/zsd.git | ||
cd /tmp/zsd.git | ||
sudo make install | ||
zsd --help | ||
- name: β¦οΈ Setup ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.6 | ||
bundler-cache: true | ||
|
||
- name: π Install asciidoctor-pdf | ||
run: | | ||
gem install asciidoctor-pdf | ||
- name: π‘ Check out repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: π· Generate zsd | ||
run: | | ||
make doc | ||
- name: π Generate PDF | ||
run: | | ||
make -C doc/zsdoc pdf | ||
- name: ποΈ Tar doc/ | ||
run: | | ||
tar cvzf /tmp/doc.tar.gz doc | ||
- name: βοΈ Upload doc.tar.gz | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: docs | ||
path: | | ||
/tmp/doc.tar.gz | ||
- name: π΅οΈ Check if the zsd docs need to be updated | ||
# NOTE: We need to run git diff twice here since w/o --quiet it's RC | ||
# is always 0. The first is to display the diff output, the second one | ||
# to test whether the diff is empty. | ||
run: | | ||
git --no-pager diff | ||
if git --no-pager diff --quiet | ||
then | ||
echo "β The zshelldocs are up to date" | ||
else | ||
{ | ||
echo "β The zshelldocs in the repo are not up to date" | ||
echo 'Please regenerate them with $ make doc' | ||
} >&2 | ||
exit 1 | ||
fi |
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