| 1 |
name: Github Pages |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: [main] |
| 6 |
# pull_request: |
| 7 |
# branches: [main] |
| 8 |
|
| 9 |
permissions: |
| 10 |
contents: read |
| 11 |
pages: write |
| 12 |
id-token: write |
| 13 |
|
| 14 |
# Allow one concurrent deployment |
| 15 |
concurrency: |
| 16 |
group: "pages" |
| 17 |
cancel-in-progress: true |
| 18 |
|
| 19 |
jobs: |
| 20 |
build-docs: |
| 21 |
uses: ./.github/workflows/build_docs.yml |
| 22 |
with: |
| 23 |
tag: "stable" |
| 24 |
|
| 25 |
test-code: |
| 26 |
uses: ./.github/workflows/test_dolfinx_versions.yml |
| 27 |
with: |
| 28 |
dolfinx_tag: "stable" |
| 29 |
|
| 30 |
deploy: |
| 31 |
needs: [build-docs, test-code] |
| 32 |
|
| 33 |
environment: |
| 34 |
name: github-pages |
| 35 |
url: ${{ steps.deployment.outputs.page_url }} |
| 36 |
|
| 37 |
if: github.event_name == 'push' |
| 38 |
runs-on: ubuntu-latest |
| 39 |
steps: |
| 40 |
- name: Download docs artifact |
| 41 |
# docs artifact is uploaded by build-docs job |
| 42 |
uses: actions/download-artifact@v8 |
| 43 |
with: |
| 44 |
name: docs |
| 45 |
path: "./public" |
| 46 |
|
| 47 |
- name: Download code coverage report artifact |
| 48 |
# docs artifact is uploaded by build-docs job |
| 49 |
uses: actions/download-artifact@v8 |
| 50 |
with: |
| 51 |
name: code-coverage-report-stable |
| 52 |
path: "./public/code-coverage-report-stable" |
| 53 |
|
| 54 |
- name: Download code coverage report artifact |
| 55 |
# docs artifact is uploaded by build-docs job |
| 56 |
uses: actions/download-artifact@v8 |
| 57 |
with: |
| 58 |
name: code-coverage-report-nightly |
| 59 |
path: "./public/code-coverage-report-nightly" |
| 60 |
|
| 61 |
|
| 62 |
- name: Upload artifact |
| 63 |
uses: actions/upload-pages-artifact@v5 |
| 64 |
with: |
| 65 |
path: "./public" |
| 66 |
|
| 67 |
- name: Checkout |
| 68 |
uses: actions/checkout@v7 |
| 69 |
|
| 70 |
- name: Setup Pages |
| 71 |
uses: actions/configure-pages@v6 |
| 72 |
|
| 73 |
- name: Deploy to GitHub Pages |
| 74 |
id: deployment |
| 75 |
uses: actions/deploy-pages@v5 |