Skip to content

Commit

Permalink
feat(ci): Add GitHub action for docs deployment
Browse files Browse the repository at this point in the history
Update docs on new commits to main
  • Loading branch information
cpvannier committed Feb 27, 2024
1 parent 0503fe7 commit 2b9a4fd
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# @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

0 comments on commit 2b9a4fd

Please sign in to comment.