-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create github action to generate documentation (#31)
- Loading branch information
1 parent
0b39188
commit b70c846
Showing
1 changed file
with
43 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,43 @@ | ||
# Github actions workflow to generate documentation | ||
|
||
name: Generate documentation and update readme | ||
|
||
# Trigger the workflow on push event for master branch | ||
# or pull request events but only for the master branch with the type closed | ||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout bootstrap-functions | ||
uses: actions/checkout@v2 | ||
|
||
- name: Checkout shdoc | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: reconquest/shdoc | ||
path: shdoc | ||
|
||
- name: Add shdoc to PATH | ||
run: | | ||
echo "::add-path::$GITHUB_WORKSPACE/shdoc" | ||
echo "$PATH" | ||
- name: Generate documentation | ||
run: bash generate_docs.sh | ||
|
||
- name: Commit changes | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add README.md docs/ | ||
git commit -m "Update documentation" | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |