-
Notifications
You must be signed in to change notification settings - Fork 452
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add github action to generate doc (#1522)
Added github action install dependencies required to generate documentation and then run the documentation generator. As a final step publish the changes to `gh-pages` branch which will be the source for github documentation. Adds badge for doc-generator github action closes: #1494 Co-authored-by: Anshul Guleria <[email protected]>
- Loading branch information
1 parent
232c458
commit 19c32a2
Showing
2 changed files
with
63 additions
and
1 deletion.
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,54 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: doc-generator | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- name: install plantuml | ||
run: | | ||
sudo apt-get update -y | ||
sudo apt-get install -y plantuml | ||
- uses: actions/[email protected] | ||
|
||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
|
||
- name: setup bundler and install dependencies | ||
run: | | ||
gem install bundler:1.17.3 | ||
cd docs | ||
bundle install | ||
- name: link documentation | ||
# gets gh-pages branch and links that to docs/_site directory | ||
run: | | ||
git fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin gh-pages | ||
git worktree add docs/_site gh-pages | ||
- name: generate documentation | ||
run: | | ||
cd docs | ||
bundle exec jekyll build | ||
- name: push generated documentation | ||
run: | | ||
cd docs/_site | ||
git config user.name "Doc Bot" | ||
git config user.email [email protected] | ||
git add . | ||
git commit -m "[BOT] 🤖 updates doc. No humans needed." | ||
git push |
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