From 2b77f2c4354210eff65b397c1d09e7dc61b7b571 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Thu, 5 Jun 2025 11:27:05 +0000 Subject: [PATCH] ci: Deploy pages. Signed-off-by: Jason Volk --- .github/workflows/bake.yml | 14 +++++++++++++- .github/workflows/package.yml | 2 +- .github/workflows/publish.yml | 17 +++++++++++++++++ README.md | 6 +++--- 4 files changed, 34 insertions(+), 5 deletions(-) diff --git a/.github/workflows/bake.yml b/.github/workflows/bake.yml index 7d97098d..71e25b73 100644 --- a/.github/workflows/bake.yml +++ b/.github/workflows/bake.yml @@ -132,7 +132,7 @@ jobs: !failure() && !cancelled() && fromJSON(inputs.artifact)[matrix.bake_target].dst && fromJSON(inputs.artifact)[matrix.bake_target].img == null - && !fromJSON(inputs.artifact)[matrix.bake_target].runner + && fromJSON(inputs.artifact)[matrix.bake_target].runner != true env: iid: ${{matrix.bake_target}}--${{matrix.cargo_profile}}--${{matrix.rust_toolchain}}--${{matrix.rust_target}}--${{matrix.feat_set}}--${{matrix.sys_name}}--${{matrix.sys_version}}--${{matrix.sys_target}} @@ -187,3 +187,15 @@ jobs: with: path: _artifact/* name: ${{matrix.cargo_profile}}-${{matrix.feat_set}}-${{fromJSON(inputs.artifact)[matrix.bake_target].dst}} + + # Optionally upload artifact as pages-artifact + - name: Upload Pages Artifact + if: > + !failure() && !cancelled() + && fromJSON(inputs.artifact)[matrix.bake_target].dst + && fromJSON(inputs.artifact)[matrix.bake_target].pages == true + + uses: actions/upload-pages-artifact@v3 + with: + path: _artifact/${{fromJSON(inputs.artifact)[matrix.bake_target].dst}} + name: github-pages diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 45967e8c..de364a6f 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -60,7 +60,7 @@ jobs: includes: ${{inputs.includes}} artifact: > { - "book": {"dst": "book", "src": "/book"}, + "book": {"dst": "book", "src": "/book", "pages": true}, } binary: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4f595d83..06a450ea 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -43,6 +43,23 @@ on: dockerhub_token: jobs: + documents: + if: > + !failure() && !cancelled() + && inputs.machines + && github.ref == 'refs/heads/main' + + name: Documents + runs-on: self-hosted + permissions: + pages: write + id-token: write + + steps: + - id: book + name: Book + uses: actions/deploy-pages@v4 + containers: if: > !failure() && !cancelled() diff --git a/README.md b/README.md index 995e03f2..a46382db 100644 --- a/README.md +++ b/README.md @@ -39,12 +39,12 @@ development. It is now maintained by full-time staff. - Arch Package is expected very soon and this will be updated. - Nix Package has not yet been updated but expect this soon. -**1.** [Configure](https://github.com/matrix-construct/tuwunel/blob/main/docs/configuration.md) by +**1.** [Configure](https://matrix-construct.github.io/tuwunel/configuration.html) by copying and editing the `tuwunel-example.toml`. The `server_name` and `database_path` must be configured. **Most users deploy via docker or a distribution package and should follow the -[appropriate guide](https://github.com/matrix-construct/tuwunel/tree/main/docs/deploying) instead.** +[appropriate guide](https://matrix-construct.github.io/tuwunel/deploying.html) instead.** This is just a summary for the impatient. See the full -[documentation](https://github.com/matrix-construct/tuwunel/blob/main/docs/). +[documentation](https://matrix-construct.github.io/tuwunel/). > [!WARNING] > Avoid using a sub-domain for your `server_name`. You can always delegate later with a [`.well-known`](https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/configuring-well-known.md)