diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9ada220..ff57cfa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ on: # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: - contents: read + contents: write pages: write id-token: write @@ -44,6 +44,26 @@ jobs: pip install mkdocs pip install mkdocs-material pip install mkdocs-mermaid2-plugin + pip install mkdocs-git-revision-date-localized-plugin + # pip install mkdocs-git-committers-plugin-2 + # pip install mkdocs-git-authors-plugin + + - name: Tag and Create Release + shell: pwsh + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + $today = Get-Date -Format "yyyy.MMdd" + $tag = "$today.$($env:GITHUB_RUN_NUMBER)" + + git config user.name "Blog Publisher" + git config user.email "automation@jabbermouth.co.uk" + + Write-Host "Tagging version $tag" + git tag -a $tag -m "$tag" + git push origin $tag + + gh release create $tag -t $tag -n "Release $tag" --notes "Release $tag" --target main - name: Build site run: mkdocs build diff --git a/.gitignore b/.gitignore index ccbfadb..010ee5f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ +.cache/ site/ \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index a68fe63..cf3871c 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,6 +1,7 @@ site_name: Neil's Whiteboard copyright: Copyright © 2020-2024 Neil Docherty - +repo_url: https://github.com/jabbermouth/blog +edit_uri: edit/main/docs/ plugins: - search @@ -17,15 +18,25 @@ plugins: lineColor: '#F8B229' secondaryColor: '#006100' tertiaryColor: '#fff' - + - git-revision-date-localized: + enable_creation_date: true + # - git-authors + # - git-committers: + # repository: jabbermouth/blog + # branch: main + theme: name: material logo: gfx/jabbermouth-good.png + icon: + repo: fontawesome/brands/github features: - navigation.indexes - navigation.top - navigation.expand - navigation.tabs + - content.action.view + # - content.action.edit palette: # Palette toggle for light mode