-
Notifications
You must be signed in to change notification settings - Fork 234
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
Showing
2 changed files
with
40 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 |
---|---|---|
|
@@ -6,7 +6,6 @@ on: | |
push: | ||
branches: 'master' | ||
paths: 'docs/**' | ||
workflow_dispatch | ||
|
||
jobs: | ||
build: | ||
|
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,40 @@ | ||
# This action is triggered whenever push to the docs folder of the master branch is made. | ||
# It generates HTML pages from the docs folder of the master branch and push them to the gh-pages branch. | ||
|
||
name: Build user documentation pages (test) | ||
on: | ||
workflow_dispatch | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Sphinx | ||
run: pip install -U Sphinx==7.3.7 | ||
|
||
- name: Install Theme | ||
run: pip install sphinx-rtd-theme | ||
|
||
- name: Checkout master | ||
uses: actions/checkout@master | ||
with: | ||
path: 'master' | ||
|
||
- name: Checkout gh-pages | ||
uses: actions/checkout@master | ||
with: | ||
path: 'gh_pages' | ||
ref: 'gh-pages' | ||
|
||
- name: Build user documentation | ||
run: sphinx-build -b html "${GITHUB_WORKSPACE}/master/docs" "${GITHUB_WORKSPACE}/gh_pages/docs" | ||
|
||
- name: Push changes in gh-pages | ||
run: | | ||
cd "${GITHUB_WORKSPACE}/gh_pages" | ||
date > generated.txt | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git add . | ||
git commit -m "update user documentation bot" | ||
git push |