Skip to content

Commit

Permalink
Merge pull request #21 from IGNF/develop
Browse files Browse the repository at this point in the history
Update master to 2.1.1
  • Loading branch information
azarz authored Apr 18, 2023
2 parents f9bee79 + b144d68 commit b9635ae
Show file tree
Hide file tree
Showing 28 changed files with 1,138 additions and 1,450 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/docker_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Docker GitHub Container Registry

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

on:
#schedule:
# - cron: '40 18 * * *'
push:
branches: [ "master" ]
# Publish semver tags as releases.
tags: [ '*.*.*' ]
pull_request:
branches: [ "master", "develop" ]

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}


jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v3
with:
context: .
file: ./docker/debian/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
68 changes: 68 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]
# Publish semver tags as releases.
tags: [ '*.*.*' ]
pull_request:
branches: [ "master", "develop" ]

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

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

env:
PYTHON_VERSION: "3.10"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: "pip"
cache-dependency-path: "requirements/*.txt"

- name: Install documentation requirements
run: python -m pip install -U -r requirements/documentation.txt

- name: Build doc using Sphinx
run: sphinx-build -b html -j auto -d documentation/_build/cache -q documentation documentation/_build/html

- name: Setup Pages
uses: actions/configure-pages@v2

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: 'documentation/_build/html'

deploy:
if: github.event_name != 'pull_request'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
Loading

0 comments on commit b9635ae

Please sign in to comment.