-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
77 lines (64 loc) · 2.04 KB
/
build.yml
File metadata and controls
77 lines (64 loc) · 2.04 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
69
70
71
72
73
74
75
76
77
name: ci
on:
pull_request:
branches:
- redesign
pull_request_review:
types: [submitted]
push:
branches:
- redesign
# Cancel in progress workflows
# in the scenario where we already had a run going for that PR/branch/tag but then triggered a new run
concurrency:
group: "${{ github.workflow }} ✨ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
if: |
github.event.pull_request.draft != true &&
(github.event_name == 'pull_request_review' && github.event.review.state == 'approved') ||
github.event_name != 'pull_request_review'
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@v6
with:
# node-version-file: ".nvmrc" use when .nvmrc is on root of the repo
node-version: "24.13"
# cache: "npm" use when package-lock.json is on root of the repo
- name: Install Node.js dependencies
working-directory: astro
run: npm ci
- name: Run tests
working-directory: astro
shell: bash
run: npm run check
build:
name: build
runs-on: ubuntu-latest
if: |
github.event.pull_request.draft != true &&
(github.event_name == 'pull_request_review' && github.event.review.state == 'approved') ||
github.event_name != 'pull_request_review'
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@v6
with:
# node-version-file: ".nvmrc" use when .nvmrc is on root of the repo
node-version: "24.13"
# cache: "npm" use when package-lock.json is on root of the repo
- name: Install Node.js dependencies
working-directory: astro
run: npm ci
- name: Build Astro site
working-directory: astro
run: npm run build