diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fd47a8f..dc3a8e2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,34 +3,47 @@ on: branches: - main workflow_dispatch: {} + +concurrency: + group: mkdocs-deploy-${{ github.ref_name }} + cancel-in-progress: true + permissions: - contents: write + contents: read + pages: write + id-token: write + jobs: - build: + deploy: + name: Build and deploy site runs-on: ubuntu-latest - container: python:3 - env: - REF: "main" # source branch/tag release - GH_PAGES_BRANCH: "gh-pages" # target branch (to publish HTML to) - GIT_USER_NAME: "publish-github-actions" # for gh-pages commit - GIT_USER_EMAIL: "publish-github-actions[bot]@users.noreply.github.com" # for gh-pages commit steps: - name: Checkout content - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7 + uses: actions/checkout@v5 with: - ref: ${{ env.REF }} - path: using fetch-depth: 0 - - name: Install pre-requisites for MkDocs - run: pip install -r using/requirements.txt - - name: Set Git identity - working-directory: using + + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: '3.13' + cache: 'pip' + + - name: Install dependencies run: | - git config user.name ${{ env.GIT_USER_NAME }} - git config user.email ${{ env.GIT_USER_EMAIL }} - - name: Sync GitHub Pages - working-directory: using - run: git checkout ${{ env.GH_PAGES_BRANCH }} && git pull && git checkout ${{ env.REF }} - - name: Build and deploy docs - working-directory: using - run: mkdocs gh-deploy --clean --verbose --remote-branch ${{ env.GH_PAGES_BRANCH }} + pip install --upgrade pip + pip install -r requirements.txt + + - name: Build MkDocs site + run: mkdocs build --clean + + - name: Configure GitHub Pages + uses: actions/configure-pages@v5 + + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v4 + with: + path: ./site + + - name: Deploy to GitHub Pages + uses: actions/deploy-pages@v4 diff --git a/docs/index.md b/docs/index.md index a8a0df2..59c468f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -5,9 +5,9 @@ SPDX-License-Identifier: Community-Spec-1.0 # Using SPDX Information on how to use the -[SPDX specification](https://spdx.dev/use/specifications/). +[System Package Data Exchange (SPDX) specification](https://spdx.dev/use/specifications/). -Copyright © 2024, The Linux Foundation and its Contributors. +Copyright © 2024-2025, The Linux Foundation and its Contributors. This work is licensed under the [Community Specification License 1.0](https://spdx.org/licenses/Community-Spec-1.0.html) @@ -15,6 +15,5 @@ This work is licensed under the !!! info - This is not part of the specification. - - Everything on this website is for informative purpose only. + This website is for informational purposes only and + is not part of the SPDX specification. diff --git a/mkdocs.yml b/mkdocs.yml index 1d2bf4d..f3faf89 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,10 +1,10 @@ site_name: Using SPDX -site_description: Information on how to use the System Package Data Exchange specification -site_author: The Linux Foundation and its Contributors. -site_url: https://spdx.github.io/using/ # set to the "root" of the site, to be combined with canonical_version +site_description: Information on how to use the System Package Data Exchange (SPDX) specification +site_author: The Linux Foundation and its Contributors +site_url: https://spdx.github.io/using/ repo_url: https://github.com/spdx/using/ -edit_uri: "edit/main/docs" # set to an empty string to disable edit links; -copyright: Using SPDX Copyright © 2024, The Linux Foundation and its Contributors. +edit_uri: "edit/main/docs" # set to an empty string to disable edit links +copyright: Using SPDX Copyright © 2024-2025, The Linux Foundation and its Contributors. use_directory_urls: true theme: name: material @@ -12,11 +12,17 @@ theme: logo: images/logo-white.svg features: - content.action.edit + - navigation.instant + - navigation.instant.progress + palette: + - scheme: default + primary: indigo + accent: indigo plugins: +- git-revision-date-localized # Use mkdocs-git-revision-date-localized-plugin - search - social -- tags: - tags_file: tags.md +- tags markdown_extensions: - admonition - abbr diff --git a/requirements.txt b/requirements.txt index e97c812..02f0e59 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ mkdocs==1.6.1 -mkdocs-material[imaging]==9.5.34 +mkdocs-git-revision-date-localized-plugin==1.4.7 +mkdocs-material[imaging]==9.6.22