ci: Deploy pages.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-06-05 11:27:05 +00:00
parent 499991e530
commit 2b77f2c435
4 changed files with 34 additions and 5 deletions

View File

@@ -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

View File

@@ -60,7 +60,7 @@ jobs:
includes: ${{inputs.includes}}
artifact: >
{
"book": {"dst": "book", "src": "/book"},
"book": {"dst": "book", "src": "/book", "pages": true},
}
binary:

View File

@@ -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()