Update for 0.10.0.dev0
#212
Workflow file for this run
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
name: tests | |
on: | |
push: | |
branches: | |
- "**" | |
schedule: | |
- cron: '0 0 * * 1' | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
container: ghcr.io/fenics/dolfinx/dolfinx:nightly | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install FEniCSx-Shells | |
run: | | |
python3 -m pip install --no-build-isolation --check-build-dependencies '.[ci]' | |
- name: ruff checks | |
run: | | |
ruff check . | |
ruff format --check . | |
- name: Build documentation | |
run: | | |
cd doc | |
python3 -m sphinx -W -b html source/ build/html/ | |
- name: Run demos | |
run: | | |
python3 -m pytest demo | |
- name: Create documentation artifact | |
run: | | |
tar \ | |
--dereference --hard-dereference \ | |
--directory doc/build/html \ | |
-cvf artifact.tar \ | |
--exclude=.git \ | |
--exclude=.github \ | |
. | |
- name: Upload documentation artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: github-pages | |
path: artifact.tar | |
retention-days: 1 | |
deploy: | |
needs: build-and-test | |
if: github.ref == 'refs/heads/main' | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Pages | |
uses: actions/configure-pages@v2 | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |