-
Notifications
You must be signed in to change notification settings - Fork 263
43 lines (36 loc) · 1.22 KB
/
Copy pathtriggers.yaml
File metadata and controls
43 lines (36 loc) · 1.22 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
name: main triggers
permissions:
contents: write
on:
push:
branches:
- main # Push events on main branch
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Trigger doc build
uses: peter-evans/repository-dispatch@v4
with:
token: ${{ secrets.DEPLOY_DOC_PAT }}
repository: devitocodes/devitoproject.org
event-type: deploy-docs
# Detect whether the PR merged into main carried the "no-pro-trigger"
# label. When present, the pro submodule update is skipped so devitopro
# PRs pinned to a specific branch don't have to be closed by hand.
- name: Check for no-pro-trigger label
id: pro_label
env:
GH_TOKEN: ${{ github.token }}
run: |
skip=$(gh api "repos/${{ github.repository }}/commits/${{ github.sha }}/pulls" \
--jq 'any(.[].labels[]; .name == "no-pro-trigger")')
echo "skip=$skip" >> "$GITHUB_OUTPUT"
- name: Trigger pro submodule update
if: steps.pro_label.outputs.skip != 'true'
uses: peter-evans/repository-dispatch@v4
with:
token: ${{ secrets.PRO_SUBMODULE }}
repository: devitocodespro/devitopro
event-type: update-submodule