Skip to content

Commit 0876a93

Browse files
committed
Further simplify.
1 parent 93ce278 commit 0876a93

2 files changed

Lines changed: 24 additions & 18 deletions

File tree

.github/workflows/build_book.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
name: Build static book contents
1+
name: Build static book contents and deploy
22

33
on:
44
workflow_call:
55
inputs:
66
is_index:
77
type: boolean
88

9+
concurrency:
10+
group: "pages"
11+
cancel-in-progress: false
12+
913
jobs:
14+
1015
build:
1116
env:
1217
book_folder: ${{ github.event.repository.name }}${{ case(inputs.is_index, '/index', '') }}
@@ -33,3 +38,18 @@ jobs:
3338
with:
3439
path: public_html
3540

41+
deploy:
42+
needs: build
43+
permissions:
44+
contents: read
45+
pages: write
46+
id-token: write
47+
environment:
48+
name: github-pages
49+
url: ${{ steps.deployment.outputs.page_url }}
50+
runs-on: ubuntu-slim
51+
steps:
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v5
55+

.github/workflows/deploy.yml

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,6 @@ jobs:
2222
with:
2323
is_index: true
2424

25-
deploy_index:
26-
needs: build_index
27-
concurrency:
28-
group: "pages"
29-
cancel-in-progress: false
30-
environment:
31-
name: github-pages
32-
url: ${{ steps.deployment.outputs.page_url }}
33-
runs-on: ubuntu-slim
34-
steps:
35-
- name: Deploy to GitHub Pages
36-
id: deployment
37-
uses: actions/deploy-pages@v5
38-
3925
setup_matrix:
4026
runs-on: ubuntu-slim
4127
outputs:
@@ -69,7 +55,7 @@ jobs:
6955
echo 'EOF'
7056
} >> "$GITHUB_OUTPUT"
7157
72-
start_book_deploy:
58+
start_matrix:
7359
needs: [setup_matrix, build_index]
7460
runs-on: ubuntu-slim
7561
environment: deploy
@@ -89,8 +75,8 @@ jobs:
8975
name: run_id-${{ matrix.site }}
9076
path: run_id.txt
9177

92-
watch_book_deploy:
93-
needs: [setup_matrix, start_book_deploy]
78+
watch_matrix:
79+
needs: [setup_matrix, start_matrix]
9480
runs-on: ubuntu-slim
9581
environment: deploy_watch
9682
env:

0 commit comments

Comments
 (0)