Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test publish docs to pages on pr #216

Closed
wants to merge 18 commits into from
111 changes: 111 additions & 0 deletions .github/workflows/publish-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy Latest Basilisk Documentation to Pages

on:
# Runs on pushes targeting the default branch:
pull_request:
branches:
- 'ci/publish-docs-to-pages-on-pr'
push:
branches:
- 'develop'
- 'ci/publish-docs-to-pages-on-pr'
tags:
- v*

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
deploy:
name: Deploy Documentation
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.9"]
steps:
# - name: Checkout
# uses: actions/checkout@v4
- name: Checkout code
uses: nschloe/action-checkout-with-lfs-cache@v1

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Cache conan packages
id: cache-conan
uses: actions/cache@v3
env:
cache-name: cache-conan-packages
with:
# conan cache files are stored in `~/.conan` on Linux/macOS
path: ~/.conan
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('conanfile.py') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-

- name: Cache pip modules
id: cache-pip
uses: actions/cache@v3
env:
cache-name: cache-pip-modules
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-

- name: "Install swig and cmake"
run: sudo apt-get update && sudo apt-get install build-essential cmake gtk2.0 libgtk2.0-dev ninja-build swig -y

- name: "Install python packages"
run: sudo apt-get install python3-setuptools python3-tk

- name: "Install wheel and conan package"
run: pip3 install wheel conan==1.61.0 pytest datashader holoviews pytest-xdist

- name: "Build basilisk"
run: python3 conanfile.py --opNav False --vizInterface False

- name: "Run Python Tests"
run: cd src && pytest -n auto -m "not scenarioTest" --junitxml=../junit/test-results-${{ matrix.python-version }}.xml

- id: deployment
uses: sphinx-notes/pages@v3
with:
python_version: 3.9
checkout: false
documentation_path: ./docs/source
requirements_path: ./docs/source/bskPkgOptions.txt
sphinx_version: 4.5.0
# sphinx_build_options: -c docs/source/conf.py

# - name: Setup Pages
# uses: actions/configure-pages@v5

# - name: Upload artifact
# uses: actions/upload-pages-artifact@v3
# with:
# # Upload documentation HTML
# path: "docs/build/html"

# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v4
Loading
Loading