-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (47 loc) · 1.57 KB
/
gh-deploy.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
name: marp-to-pages
concurrency: marp-to-pages
on:
push:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
pages: write
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Get List of investigations
run: sh ./investigations/list_investigations.sh
- name: Copy investigations
run: cp -r ./investigations ./build
- name: Rename README.md to index.md
run: find ./build -type f -name "README.md" -execdir mv {} index.md \;
- name: Download moj theme
run: wget https://raw.githubusercontent.com/ministryofjustice/marp-moj-theme/main/themes/moj.css
- name: Marp Build (Investigations)
run: npx @marp-team/[email protected] ./build --html --theme moj.css
- name: Copy mission statement images directory
run: cp -R mission_statement/images build/images
- name: Marp Build (Mission statement)
run: |
npx @marp-team/[email protected] mission_statement/README.md \
-o build/index.html --theme moj.css --html
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'build/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4