Repository navigation
65 lines (56 loc) · 1.54 KB
/
Copy pathdeploy.yml
File metadata and controls
65 lines (56 loc) · 1.54 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
59
60
61
62
63
64
65
name: Deploy mdBook site to Pages
on:
push:
branches:
- main
workflow_dispatch:
inputs:
ref:
required: false
type: string
default: main
description: |
The git ref to deploy (ex. 'main', 'branch', '<commit sha>')
publish-domain:
required: false
type: string
default: "component-model.bytecodealliance.org"
description: |
The domain to which to publish (ex. 'component-model.bytecodealliance.org')
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ inputs.ref || 'main' }}
- name: build mdbook
uses: ./.github/actions/mdbook
with:
publish-pages-artifact: true
publish-domain: ${{ inputs.publish-domain || 'component-model.bytecodealliance.org' }}
deploy:
if: ${{ github.repository_owner == 'bytecodealliance' }}
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
needs:
- build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5