This repository has been archived by the owner on Jan 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
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 #7 from classPythonAddike/main
Added documentation workflow
- Loading branch information
Showing
47 changed files
with
271 additions
and
19,593 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,61 @@ | ||
name: Publish Documentation | ||
|
||
env: | ||
GITHUB_ACTOR: Tekgar | ||
GITHUB_REPOSITORY: classPythonAddike/pycordia | ||
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
|
||
jobs: | ||
|
||
build_sphinx_job: | ||
runs-on: ubuntu-latest | ||
container: debian:buster-slim | ||
|
||
steps: | ||
|
||
- name: Install packages and clone repo | ||
run: | | ||
set -x | ||
apt-get update | ||
apt-get install -y git | ||
apt-get -y install git python3-pip | ||
git clone "https://token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" . | ||
shell: bash | ||
|
||
- name: Install requirements | ||
run: | | ||
python3 -m pip install -r requirements.txt | ||
- name: Build docs with Sphinx | ||
run: | | ||
make generate_docs | ||
rm .github examples pycordia -rf | ||
rm requirements.txt setup.py | ||
cp docs/_build/html . -r | ||
rm docs -rf | ||
mv html docs | ||
mv html-docs/* . | ||
shell: bash | ||
|
||
- name: Initialise Git | ||
run: | | ||
git config --global user.name "${GITHUB_ACTOR}" | ||
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
git init | ||
git remote add deploy "https://token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" | ||
git checkout -b gh-pages | ||
shell: bash | ||
|
||
- name: Push Docs | ||
run: | | ||
touch .nojekyll | ||
git add . | ||
msg="Updating docs for commit ${GITHUB_SHA}" | ||
git commit -am "${msg}" | ||
git push deploy gh-pages --force | ||
shell: bash |
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 |
---|---|---|
|
@@ -120,6 +120,9 @@ venv.bak/ | |
# mkdocs documentation | ||
/site | ||
|
||
# sphinx docs | ||
/docs/_build | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
generate_docs: | ||
echo "Generating Docs" | ||
cd docs && sphinx-apidoc -f -o source/ --module-first ../pycordia | ||
cd docs && make html | ||
@echo Generating Docs . . . | ||
@cd docs && sphinx-apidoc -f -o source/ --module-first ../pycordia | ||
@cd docs && make html |
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
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.