forked from mitre-attack/attack-website
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (45 loc) · 1.3 KB
/
gh-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
name: GitHub Pages
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Upgrade pip
run: python3 -m pip install --upgrade pip
- name: Install python requirements
run: python3 -m pip install -r requirements.txt
- name: Build website
run: python3 update-attack.py --attack-brand --extras --no-test-exitstatus
- name: Cleanup build
run: rm -rf attack-versions
- name: Remove STIX directory
run: rm -rf output/stix/
- name: Build ATT&CK Search module
run: |
cd attack-search
npm ci
npm run build
cp dist/search_bundle.js ../output/theme/scripts/
cd ..
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
if: ${{ github.ref == 'refs/heads/master' }}
with:
deploy_key: ${{ secrets.DEPLOY_KEY }}
publish_dir: ./output