Skip to content

feat(ci): Add GitHub action for docs deployment #1

feat(ci): Add GitHub action for docs deployment

feat(ci): Add GitHub action for docs deployment #1

Workflow file for this run

# @Copyright: CEA-LIST/DIASI/SIALV/LVA (2023)
# @Author: CEA-LIST/DIASI/SIALV/LVA <[email protected]>
# @License: CECILL-C
#
# This software is a collaborative computer program whose purpose is to
# generate and explore labeled data for computer vision applications.
# This software is governed by the CeCILL-C license under French law and
# abiding by the rules of distribution of free software. You can use,
# modify and/ or redistribute the software under the terms of the CeCILL-C
# license as circulated by CEA, CNRS and INRIA at the following URL
#
# http://www.cecill.info
# This workflow will publish the new version of Pixano to PyPI when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Publish
on:
push:
branches:
- "main"
permissions:
contents: write
jobs:
deploy_docs:
name: Publish documentation website
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Configure git credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Create cache_id for key creation
run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- name: Create cache key with cache_id
uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- name: Install dependencies
run: pip install .[documentation]
- name: Publish documentation website
run: mkdocs gh-deploy --force