-
Notifications
You must be signed in to change notification settings - Fork 7
104 lines (86 loc) · 2.62 KB
/
build-site.yml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Build Site
on:
workflow_dispatch:
workflow_run:
workflows:
- Build Assessment
- Build Notes
- Build Practicals
- Build Studies
- Build Slides
- Build Cloud Assignment Requirements
- Build OpenAPI Docs
branches: [main]
types:
- completed
push:
paths:
- public/**
jobs:
build-site:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download notes
uses: dawidd6/action-download-artifact@v2
with:
workflow: build-notes.yml
workflow_conclusion: success
branch: main
path: notes
- run: cp -r ./notes/notes/handouts ./public
- name: Download practicals
uses: dawidd6/action-download-artifact@v2
with:
workflow: build-practicals.yml
workflow_conclusion: success
branch: main
path: practicals
- run: cp -r ./practicals/practicals/practicals ./public
- name: Download studies
uses: dawidd6/action-download-artifact@v2
with:
workflow: build-studies.yml
workflow_conclusion: success
branch: main
path: studies
- run: cp -r ./studies/studies/studies ./public
- name: Download slides
uses: dawidd6/action-download-artifact@v2
with:
workflow: build-slides.yml
workflow_conclusion: success
branch: main
path: slides
- run: cp -r ./slides/slides/slides ./public
- name: Download assessment
uses: dawidd6/action-download-artifact@v2
with:
workflow: build-assessment.yml
workflow_conclusion: success
branch: main
path: assessment
- run: cp -r ./assessment/assessment/assessment ./public
- name: Download specification
uses: dawidd6/action-download-artifact@v2
with:
workflow: build-spec.yml
workflow_conclusion: success
branch: main
path: cloud-spec
- run: cp -r ./cloud-spec/cloud-spec ./public/assessment/ticketoverflow
- name: Download button specification
uses: dawidd6/action-download-artifact@v2
with:
workflow: build-api.yml
workflow_conclusion: success
branch: main
path: apis
- run: mkdir -p public/api && cp -r ./apis/apis/* ./public/api
- name: Publish GH Pages
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public