Skip to content

Commit

Permalink
New docs workflow, fixing some syntax in workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
GDeLaurentis committed May 23, 2024
1 parent fe4772c commit 1911c02
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 6 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/cd_docs.yml
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.
3 changes: 0 additions & 3 deletions .github/workflows/ci_lint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

name: CI Lint

on:
Expand All @@ -8,7 +6,6 @@ on:
pull_request:
branches: [ main ]
workflow_dispatch:
branches: [ main ]

jobs:

Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/ci_test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

name: CI Test

on:
Expand All @@ -8,7 +6,6 @@ on:
pull_request:
branches: [ main ]
workflow_dispatch:
branches: [ main ]

jobs:

Expand Down

0 comments on commit 1911c02

Please sign in to comment.