Repository navigation
58 lines (50 loc) · 1.51 KB
/
Copy pathdeploy.yml
File metadata and controls
58 lines (50 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Deploy the tutorial to Pages
# book/ is written by owlbarn/springer's CI (converted chapters and the site
# tools); site.toml chooses the published chapters. A push of either deploys.
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
outputs:
ready: ${{ steps.content.outputs.ready }}
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Check for book content
id: content
run: |
if [ -f book/manifest.json ]; then
echo "ready=true" >> "$GITHUB_OUTPUT"
else
echo "::notice::No book content yet; owlbarn/springer's CI publishes it. The current site is unchanged."
echo "ready=false" >> "$GITHUB_OUTPUT"
fi
- name: Assemble the site
if: steps.content.outputs.ready == 'true'
run: python3 book/tools/assemble.py --content book --config site.toml --out _site
- name: Upload artifact
if: steps.content.outputs.ready == 'true'
uses: actions/upload-pages-artifact@v5
with:
path: _site
deploy:
needs: build
if: needs.build.outputs.ready == 'true'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5