Skip to content

Commit 7865aa7

Browse files
nwf-msrdavidchisnall
authored andcommitted
Publish built PDF to GitHub Pages
1 parent 09ef3a7 commit 7865aa7

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

.github/workflows/compile.yml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
name: CI
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
pull_request:
9+
10+
concurrency:
11+
group: "pages"
12+
cancel-in-progress: false
413

514
jobs:
615
build:
@@ -29,8 +38,30 @@ jobs:
2938
run: |
3039
eval $(opam env) && make -C archdoc
3140
cp archdoc/cheriot-architecture.pdf install
41+
mkdir -p _site/
42+
cp archdoc/cheriot-architecture.pdf _site/
3243
- name: Upload simulator artifact
3344
uses: actions/upload-artifact@v4
3445
with:
3546
name: cheriot_sim
3647
path: install/
48+
49+
deploy:
50+
# Run only when landing, not as part of a PR
51+
if: ${{ github.event_name == 'push' }}
52+
53+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
54+
permissions:
55+
contents: read
56+
pages: write
57+
id-token: write
58+
59+
environment:
60+
name: github-pages
61+
url: ${{ steps.deployment.outputs.page_url }}
62+
runs-on: [ubuntu-20.04]
63+
needs: build
64+
steps:
65+
- name: Deploy to GitHub Pages
66+
id: deployment
67+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)