Merging master #14
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: docs | |
on: | |
push: | |
branches: [ "docs" ] | |
pull_request: | |
branches: [ "docs" ] | |
jobs: | |
build-docs: | |
runs-on: ubuntu-latest | |
container: ghcr.io/ifilot/sphinx:v0.6.0 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build documentation | |
run: cd docs && make html | |
- name: Perform inplace compilation | |
run: python3 setup.py build_ext --inplace | |
- name: Upload math result for job 1 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: html-docs | |
path: ./docs/_build/html | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build-docs | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Download docs | |
uses: actions/download-artifact@v3 | |
with: | |
name: html-docs | |
path: html-docs | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
ghcr.io/ifilot/pytessel-docs-nginx | |
- name: Log in to the Container registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Docker images | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: doc.Dockerfile | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |