-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New docs workflow, fixing some syntax in workflows.
- Loading branch information
1 parent
fe4772c
commit 1911c02
Showing
4 changed files
with
56 additions
and
6 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,56 @@ | ||
name: Documentation | ||
|
||
on: | ||
release: | ||
types: [created] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
BuildDocs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Checkout this Repo | ||
uses: actions/checkout@v3 | ||
with: | ||
path: . | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install sphinx sphinx-rtd-theme | ||
pip install -e . | ||
- name: Build docs | ||
run: | | ||
cd sphinx | ||
make github | ||
- name: setup git config | ||
run: | | ||
git config user.name "GitHub Actions Bot" | ||
git config user.email "<>" | ||
- name: Commit docs to gh-pages branch | ||
run: | | ||
cp -r docs/ docs.back/ | ||
echo "fetching..." | ||
git fetch | ||
git reset --hard | ||
echo "checking out gh-pages..." | ||
git checkout gh-pages | ||
rm -r docs/ | ||
cp -r docs.back/ docs/ | ||
touch docs/.nojekyll | ||
git checkout main README.md | ||
git add -f docs/.nojekyll | ||
git add -f docs/.buildinfo | ||
git add README.md docs/* | ||
echo "committing changes if needed..." | ||
git status | ||
if ! git diff-index --quiet HEAD; then | ||
git commit -m "Automated docs update." | ||
git push origin gh-pages | ||
fi |
File renamed without changes.
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
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