-
Notifications
You must be signed in to change notification settings - Fork 599
67 lines (55 loc) · 1.8 KB
/
github-pages.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
name: GitHub Pages
on:
push:
branches: ["master"]
jobs:
deploy-to-gh-pages:
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
defaults:
run:
working-directory: ./nav-app/
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: nav-app/package-lock.json
- name: Install Node dependencies
run: npm ci
- name: Build Navigator
run: npm run build -- --configuration production,googleAnalytics --aot=false --build-optimizer=false --base-href=https://mitre-attack.github.io/attack-navigator/
- name: Download and extract Navigator v2
uses: robinraju/[email protected]
with:
repository: "mitre-attack/attack-navigator"
tag: "v2.3.2"
fileName: "attack-navigator-v2.zip"
extract: true
- name: Move v2 to output directory
run: mv ../v2/ dist/
- name: Download and extract Navigator v3
uses: robinraju/[email protected]
with:
repository: "mitre-attack/attack-navigator"
tag: "v3.1"
fileName: "attack-navigator-v3.zip"
extract: true
- name: Move v3 to output directory
run: mv ../v3/ dist/
- name: Copy redirects
run: cp -r ./redirects/* ./dist/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/master' }}
with:
deploy_key: ${{ secrets.DEPLOY_KEY }}
publish_dir: ./nav-app/dist