-
Notifications
You must be signed in to change notification settings - Fork 7
35 lines (28 loc) · 1.09 KB
/
namespace-check.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
name: "Namespace Check"
# Triggers on push event on all branches, excluding the 'prod' branch
on:
push:
branches-ignore:
- prod # Exclude the 'prod' branch from triggering this workflow
jobs:
namespace-check:
runs-on: ubuntu-latest # Use the latest version of the Ubuntu runner environment
steps:
# Step 1: Check out the repository code
- name: Checkout code
uses: actions/checkout@v3
# Step 2: Set up Node.js environment and cache Yarn dependencies
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: ".node-version" # Specify the Node.js version from '.node-version' file
cache: "yarn" # Cache Yarn dependencies for faster builds
# Step 3: Install project dependencies using Yarn
- name: Install dependencies
run: yarn
# Step 4: Build the component library in 'dist/' directory
- name: Build component library in dist/
run: yarn build
# Step 5: Run the Namespace Checking script
- name: Namespace Checking
run: yarn namespace-check