-
Notifications
You must be signed in to change notification settings - Fork 2
84 lines (78 loc) · 2.79 KB
/
github-pages.yml
File metadata and controls
84 lines (78 loc) · 2.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# -*- coding: utf-8 -*-
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
# This file is part of PyHOPE
#
# Copyright (c) 2024 Numerics Research Group, University of Stuttgart, Prof. Andrea Beck
#
# PyHOPE is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# PyHOPE is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# PyHOPE. If not, see <http://www.gnu.org/licenses/>.
# ==================================================================================================================================
# Continuous Integration/Continuous Deployment
# ==================================================================================================================================
# Workflow for deploying documentation to GitHub Pages
name: Documentation
on:
# Runs on pushes targeting the default branch
# push:
# branches:
# - main
# Runs after CI workflow completes on the default branch
workflow_run:
workflows: ["CI"]
types:
- completed
branches:
- main
# Allows running 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 only one concurrent deployment, skipping runs queued between the run in-progress and latest queued
# > However, do NOT cancel in-progress runs as we want to allow these production deployments to complete
concurrency:
group: github-pages
cancel-in-progress: false
jobs:
# Single deploy job
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
if: github.event.repository.fork == false
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v5
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
# Install MkDocs
- run: pip install mkdocs-material mkdocs-autorefs mkdocs-glightbox
# Build documentation
- run: mkdocs build
- uses: actions/configure-pages@v6
- uses: actions/upload-pages-artifact@v5
with:
path: 'site/'
- uses: actions/deploy-pages@v5
id: deployment