-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (47 loc) · 1.43 KB
/
build.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
name: Build
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
jobs:
build:
name: Build Blackprint Modules
runs-on: ubuntu-latest
timeout-minutes: 5 # Usually this will be finish under 5 minutes
steps:
- uses: actions/checkout@v3
- name: ⚙ Setup Node.js
uses: actions/setup-node@v3
with:
node-version: lts/*
registry-url: https://registry.npmjs.org/
- name: 🔃 Setup PNPM modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- uses: pnpm/action-setup@v2
with:
version: 6.0.2
run_install: true
- name: 🛠 Compiling Blackprint Modules
run: npx blackprint build production
- name: 🔥 Run Tests
# env:
# YOUR_ENV_A: ${{ secrets.YOUR_ENV_A }}
# YOUR_ENV_B: ${{ secrets.YOUR_ENV_B }}
run: npm test
- name: 🚀 Deploy
uses: JamesIves/github-pages-deploy-action@v4
if: github.event_name != 'pull_request' # Don't deploy, it will be dangerous if someone submit dangerous pull request
with:
branch: dist # The branch the action should deploy to.
folder: dist # The folder the action should deploy.
single-commit: true