-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (79 loc) · 2.82 KB
/
ci.yml
File metadata and controls
89 lines (79 loc) · 2.82 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
85
86
87
88
89
# SPDX-FileCopyrightText: Copyright (C) 2025 Opal Health Informatics Group at the Research Institute of the McGill University Health Centre <john.kildea@mcgill.ca>
#
# SPDX-License-Identifier: MIT
name: ci
on:
push:
branches:
- main
pull_request:
merge_group:
workflow_call:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# don't cancel any workflows on the main branch
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
permissions:
contents: read
jobs:
lint:
uses: opalmedapps/actions/.github/workflows/prek.yaml@main
with:
skip: markdownlint-cli2,reuse-lint-file
run-reuse-workflow:
uses: opalmedapps/.github/.github/workflows/reuse.yaml@main
markdownlint:
permissions:
contents: read
# required for upload-sarif action
# https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github#example-workflow-for-sarif-files-generated-outside-of-a-repository
security-events: write
uses: opalmedapps/.github/.github/workflows/markdownlint.yaml@main
with:
semantic-linebreak: false
mkdocs-material-linter: true
build:
runs-on: ubuntu-latest
needs:
- lint
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
# fetch the full git history to be able to determine creation dates for pages
# see: https://github.com/timvink/mkdocs-git-revision-date-localized-plugin?tab=readme-ov-file#note-when-using-build-environments
fetch-depth: 0
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
id: setup-uv
with:
# renovate: datasource=pypi dependency=uv
version: "0.11.7"
- name: Install dependencies
run: |
uv sync --locked
# see: https://squidfunk.github.io/mkdocs-material/publishing-your-site/#with-github-actions
# weekly cache updates
- run: echo "cache_id=$(date --utc '+%V')" >> "$GITHUB_ENV"
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
# weekly cache
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
# https://github.com/actions/toolkit/blob/main/docs/commands.md#problem-matchers
- name: Add problem matcher for HTML proofer invalid url errors
run: |
echo "::add-matcher::.github/matcher-htmlproofer.json"
- name: Build site
run: uv run mkdocs build --strict
deploy:
uses: ./.github/workflows/deploy.yml
if: success() && github.ref == 'refs/heads/main'
needs:
- lint
- markdownlint
- build
permissions:
contents: write