-
Notifications
You must be signed in to change notification settings - Fork 4
55 lines (49 loc) · 1.44 KB
/
Copy pathnotify-engine.yml
File metadata and controls
55 lines (49 loc) · 1.44 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
name: Curriculum CI & Dispatch
on:
pull_request:
branches: [main]
paths-ignore:
- 'bot_challenges/**'
push:
branches: [main]
paths-ignore:
- 'bot_challenges/**'
jobs:
# STATUS CHECK: Clones the contributor's PR content alongside Engine to verify MDX syntax
validate-build:
name: Validate Docusaurus Build
runs-on: ubuntu-latest
steps:
- name: Checkout Curriculum (PR Code)
uses: actions/checkout@v4
with:
path: Curriculum
- name: Checkout Engine
uses: actions/checkout@v4
with:
repository: ThePythonLedger/Docusaurus-engine
path: engine
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: engine/package-lock.json
- name: Test Build in Engine
run: |
cd engine
npm ci
npm run build
# DISPATCH: Triggers the live site rebuild ONLY after a push/merge to main passes validation
dispatch-engine:
name: Notify Engine
needs: validate-build
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.PAT_TOKEN }}
repository: razorblade23/the-python-ledger-engine
event-type: curriculum_updated