|
1 | | -# @Copyright: CEA-LIST/DIASI/SIALV/LVA (2023) |
2 | | -# @Author: CEA-LIST/DIASI/SIALV/LVA <pixano@cea.fr> |
3 | | -# @License: CECILL-C |
4 | | -# |
5 | | -# This software is a collaborative computer program whose purpose is to |
6 | | -# generate and explore labeled data for computer vision applications. |
7 | | -# This software is governed by the CeCILL-C license under French law and |
8 | | -# abiding by the rules of distribution of free software. You can use, |
9 | | -# modify and/ or redistribute the software under the terms of the CeCILL-C |
10 | | -# license as circulated by CEA, CNRS and INRIA at the following URL |
11 | | -# |
12 | | -# http://www.cecill.info |
13 | | - |
14 | | -# This workflow will publish the new version of Pixano to PyPI when a release is created |
15 | | -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python |
16 | | - |
17 | | -name: Publish |
| 1 | +name: Deploy redirect |
18 | 2 |
|
19 | 3 | on: |
20 | 4 | push: |
21 | 5 | branches: |
22 | 6 | - "main" |
23 | 7 |
|
24 | 8 | permissions: |
25 | | - contents: write |
| 9 | + contents: read |
| 10 | + pages: write |
| 11 | + id-token: write |
| 12 | + |
| 13 | +concurrency: |
| 14 | + group: "pages" |
| 15 | + cancel-in-progress: false |
26 | 16 |
|
27 | 17 | jobs: |
28 | | - deploy_docs: |
29 | | - name: Publish documentation website |
| 18 | + deploy: |
| 19 | + name: Deploy redirect page |
30 | 20 | runs-on: ubuntu-latest |
| 21 | + environment: |
| 22 | + name: github-pages |
| 23 | + url: ${{ steps.deployment.outputs.page_url }} |
31 | 24 |
|
32 | 25 | steps: |
33 | 26 | - name: Checkout repository |
34 | 27 | uses: actions/checkout@v4 |
35 | 28 |
|
36 | | - - name: Configure git credentials |
37 | | - run: | |
38 | | - git config user.name github-actions[bot] |
39 | | - git config user.email 41898282+github-actions[bot]@users.noreply.github.com |
| 29 | + - name: Setup Pages |
| 30 | + uses: actions/configure-pages@v5 |
40 | 31 |
|
41 | | - - name: Set up Python 3.10 |
42 | | - uses: actions/setup-python@v5 |
| 32 | + - name: Upload artifact |
| 33 | + uses: actions/upload-pages-artifact@v3 |
43 | 34 | with: |
44 | | - python-version: "3.10" |
45 | | - |
46 | | - - name: Create cache_id for key creation |
47 | | - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV |
48 | | - |
49 | | - - name: Create cache key with cache_id |
50 | | - uses: actions/cache@v4 |
51 | | - with: |
52 | | - key: mkdocs-material-${{ env.cache_id }} |
53 | | - path: .cache |
54 | | - restore-keys: | |
55 | | - mkdocs-material- |
56 | | -
|
57 | | - - name: Install dependencies |
58 | | - run: pip install . |
| 35 | + path: public |
59 | 36 |
|
60 | | - - name: Publish documentation website |
61 | | - run: mkdocs gh-deploy --force |
| 37 | + - name: Deploy to GitHub Pages |
| 38 | + id: deployment |
| 39 | + uses: actions/deploy-pages@v4 |
0 commit comments