diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 464a8fb..17a1b53 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -1,22 +1,29 @@ name: github-pages on: push: - branches: - - master + branches: [master] + tags: ["v*"] + permissions: contents: write + jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-python@v5 with: python-version: 3.x - - uses: actions/cache@v4 - with: - key: ${{ github.ref }} - path: .cache - - run: pip install mkdocs-material - - run: pip install pillow cairosvg - - run: mkdocs gh-deploy --force + + - name: Install dependencies + run: pip install mike mkdocs-material[imaging] mkdocs-minify-plugin + + - name: Publish documentation + run: mike deploy --push --update-aliases ${{ github.ref_name }} latest + env: + GIT_COMMITTER_NAME: "github-actions[bot]" + GIT_COMMITTER_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com" diff --git a/docs/theme-overrides/layouts/home.html b/docs/theme-overrides/layouts/home.html index 8894bd4..447ab19 100644 --- a/docs/theme-overrides/layouts/home.html +++ b/docs/theme-overrides/layouts/home.html @@ -327,7 +327,7 @@
@@ -356,7 +356,7 @@
diff --git a/mkdocs.yml b/mkdocs.yml index 23af01d..553a420 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,13 +1,14 @@ -# build with MkDocs 1.5.3, mkdocs-material-9.4.7 - +--- site_name: WireGuard Portal -site_description: 'Manage WireGuard Peers and Interface using a beautiful and simple web UI.' -site_url: https://wgportal.org -repo_name: 'h44z/wg-portal' -repo_url: 'https://github.com/h44z/wg-portal' -copyright: 'Copyright © 2023-2024 WireGuard Portal Project' +site_description: Manage WireGuard Peers and Interface using a beautiful and simple web UI. +site_url: https://wgportal.org/ +repo_name: h44z/wg-portal +repo_url: https://github.com/h44z/wg-portal +copyright: Copyright © 2023-2024 WireGuard Portal Project + extra_css: - stylesheets/extra.css + theme: name: material custom_dir: docs/theme-overrides @@ -18,15 +19,19 @@ theme: favicon: assets/images/favicon-large.png language: en features: - - tabs - - instant + - navigation.instant - navigation.tabs plugins: - search - #- social # disable until https://github.com/squidfunk/mkdocs-material/issues/6983 is resolved + - social + - minify: + minify_html: true extra: + version: + provider: mike + default: latest social: - icon: fontawesome/brands/github-alt link: https://github.com/h44z/wg-portal