-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7247240
commit 09da94b
Showing
3 changed files
with
69 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Runs Preetier Check, Lint Check, Build Check | ||
# first runs prettier and lint checks then builds the code. | ||
on: [pull_request, push] | ||
|
||
jobs: | ||
build-project: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install Dependencies | ||
run: npm install | ||
|
||
- name: Code Formatting Check #Runs Prettier Script | ||
run: npm run prettier | ||
|
||
- name: Linting Check #Runs ESLint Script | ||
run: npm run lint | ||
|
||
- name: Build #Build the project | ||
run: npm run build | ||
|
||
- name: Check Build Status | ||
run: | | ||
if [ $? -eq 0 ]; then | ||
echo "Build successful!" | ||
else | ||
echo "Build failed!" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Workflow name | ||
name: "Deploy StoryBook on Chromatic" | ||
|
||
# Event for the workflow | ||
on: [pull_request,push] | ||
|
||
# List of jobs | ||
jobs: | ||
chromatic-deployment: | ||
# Operating System | ||
runs-on: ubuntu-latest | ||
# Job steps | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v1 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
# 👇 Adds Chromatic as a step in the workflow | ||
- name: Publish to Chromatic | ||
uses: chromaui/action@v1 | ||
# Chromatic GitHub Action options | ||
with: | ||
# 👇 Chromatic projectToken, refer to the manage page to obtain it. | ||
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters