docs: move firebase project setup into its dedicated page (#402) #641
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6 | |
| id: setup-uv | |
| with: | |
| # renovate: datasource=pypi dependency=uv | |
| version: "0.9.17" | |
| - name: Install pre-commit | |
| run: | | |
| uv sync --locked --only-dev | |
| - uses: mschoettle/pre-commit-action@0ffaba63d7e205c4109d6a3ca4ced5fc4decd04b # v4.2.3 | |
| env: | |
| 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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| 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@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6 | |
| id: setup-uv | |
| with: | |
| # renovate: datasource=pypi dependency=uv | |
| version: "0.9.17" | |
| - 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@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 | |
| with: | |
| # weekly cache | |
| key: mkdocs-material-${{ env.cache_id }} | |
| path: .cache | |
| restore-keys: | | |
| mkdocs-material- | |
| - 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 |