-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (55 loc) · 1.94 KB
/
pr-preview.yaml
File metadata and controls
68 lines (55 loc) · 1.94 KB
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
name: PR Preview
on:
pull_request:
types: [opened, synchronize, reopened, closed]
concurrency: preview-${{ github.ref }}
permissions:
contents: write
pull-requests: write
jobs:
preview:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
if: github.event.action != 'closed'
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install Python dependencies
if: github.event.action != 'closed'
run: pip install pyyaml jsonschema
- name: Generate JSON from YAML definitions
if: github.event.action != 'closed'
run: |
mkdir -p form-app/src/assets
python script/run_all.py \
--schema schemas/formSchema.json \
--source sources/prescan_DPIA.yaml \
--begrippen-yaml sources/begrippenkader-dpia.yaml \
--output-json form-app/src/assets/PreScanDPIA.json \
--output-md docs/questions/questions_prescan_DPIA.md
python script/run_all.py \
--schema schemas/formSchema.json \
--source sources/DPIA.yaml \
--begrippen-yaml sources/begrippenkader-dpia.yaml \
--output-json form-app/src/assets/DPIA.json \
--output-md docs/questions/questions_DPIA.md
- name: Set up Node.js
if: github.event.action != 'closed'
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: 'form-app/package-lock.json'
- name: Install Node dependencies
if: github.event.action != 'closed'
run: cd form-app && npm ci
- name: Build the Vue application
if: github.event.action != 'closed'
run: cd form-app && npm run build
- name: Deploy PR preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: form-app/dist/