-
Notifications
You must be signed in to change notification settings - Fork 621
68 lines (55 loc) · 1.53 KB
/
pull-request.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
68
name: PR Workflows
# Run action on pull request event
on: [pull_request]
jobs:
# Build exampleSite
build:
runs-on: ubuntu-latest
steps:
# checkout to the commit that has been pushed
- uses: actions/[email protected]
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install node modules
run: npm install
- name: Setup Hugo
uses: peaceiris/[email protected]
with:
hugo-version: 'latest'
extended: true
- name: Build
run: |
cd exampleSite
hugo --minify
# Run linter
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install node modules
run: npm install
- name: Lint
run: |
npm run lint
# Ensure that PR has desired labels
enforce-label:
runs-on: ubuntu-latest
steps:
- uses: yogevbd/[email protected]
with:
REQUIRED_LABELS_ANY: "automerge,breaking-change,bug-fix,enhancement,feature,translation"
REQUIRED_LABELS_ANY_DESCRIPTION: "The PR must have at least one these labels: ['automerge','breaking-change','bug-fix','enhancement','feature','translation']"
# Check for any broken links
markdown-link-check:
runs-on: ubuntu-latest
steps:
# checkout to latest commit
- uses: actions/[email protected]
# run markdown linter
- uses: gaurav-nelson/[email protected]