Skip to content

Commit

Permalink
added doc on gh action
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoRenaud committed Dec 4, 2023
1 parent ece4225 commit 5c0ae26
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,17 @@ jobs:
GITHUB_TOKEN: ${{ secrets.github_token }}
COVERALLS_FLAG_NAME: python-${{ matrix.version }}
COVERALLS_PARALLEL: true
# Standard drop-in approach that should work for most people.
- uses: ammaraskar/sphinx-action@master
with:
docs-folder: "docs/"
# Great extra actions to compose with:
# Create an artifact of the html output.
- uses: actions/upload-artifact@v1
with:
name: DocumentationHTML
path: docs/_build/html/


finish:
needs: build
Expand All @@ -71,3 +82,23 @@ jobs:
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
# Publish built docs to gh-pages branch.
# ===============================
- name: Commit documentation changes
run: |
git clone https://github.com/NLESC-JCER/QMCTorch.git --branch gh-pages --single-branch gh-pages
cp -r docs/_build/html/* gh-pages/
cd gh-pages
touch .nojekyll
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update documentation" -a || true
# The above command will fail if no changes were present, so we ignore
# that.
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 5c0ae26

Please sign in to comment.