mirror of
https://github.com/vale981/hopsflow
synced 2025-03-06 01:01:38 -05:00
53 lines
1.5 KiB
YAML
53 lines
1.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build-docs:
|
|
runs-on: ubuntu-latest
|
|
container: sphinxdoc/sphinx:latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- run: pip install -r requirements.txt
|
|
- run: apt update && apt install -y git
|
|
- run: cd docs && make html && cd build/html && touch .nojekyll
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: DocumentationHTML
|
|
path: docs/build/html/
|
|
|
|
- name: Publish to GitHub Pages
|
|
if: success()
|
|
uses: crazy-max/ghaction-github-pages@v2
|
|
with:
|
|
target_branch: gh-pages
|
|
build_dir: docs/build/html
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
# # Publish built docs to gh-pages branch.
|
|
# # ===============================
|
|
# - name: Commit documentation changes
|
|
# run: |
|
|
# git clone https://github.com/ammaraskar/sphinx-action-test.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 }}
|