-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): Reorganizing workflow file
- Loading branch information
Showing
1 changed file
with
35 additions
and
11 deletions.
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 |
---|---|---|
|
@@ -16,8 +16,9 @@ jobs: | |
- uses: amannn/action-semantic-pull-request@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
audit: | ||
name: audit | ||
name: Audit | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -26,8 +27,9 @@ jobs: | |
node-version: 20.9.0 | ||
- name: Test | ||
run: ./scripts/audit.sh | ||
|
||
tests: | ||
name: tests | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -42,8 +44,9 @@ jobs: | |
run: yarn build:presets | ||
- name: Test | ||
run: yarn test | ||
|
||
size: | ||
name: size | ||
name: Size | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -56,14 +59,12 @@ jobs: | |
run: yarn dist:presets | ||
- name: Test | ||
run: yarn size-limit | ||
deploy-pull-request-preview: | ||
name: deploy preview | ||
|
||
build: | ||
name: Build Application | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'pull_request' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.9.0 | ||
|
@@ -73,6 +74,21 @@ jobs: | |
run: yarn build:icons | ||
- name: Package application | ||
run: yarn dist | ||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist | ||
|
||
deploy-preview: | ||
name: Deploy to Netlify Preview | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'pull_request' | ||
needs: build | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: dist | ||
- name: Deploy to Netlify | ||
uses: nwtgck/[email protected] | ||
with: | ||
|
@@ -83,22 +99,30 @@ jobs: | |
NETLIFY: true | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
|
||
chromatic: | ||
name: Run Chromatic | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: dist | ||
- name: Run Chromatic for EC | ||
uses: chromaui/action@latest | ||
with: | ||
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | ||
storybookBuildDir: dist/website/playground/ec | ||
exitZeroOnChanges: true | ||
onlyStoryNames: 'Components/Accordion' | ||
- name: Run Chromatic for EU | ||
uses: chromaui/action@latest | ||
with: | ||
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | ||
storybookBuildDir: dist/website/playground/eu | ||
exitZeroOnChanges: true | ||
onlyStoryNames: 'Components/Accordion' | ||
|
||
deploy-release-branch: | ||
name: deploy release branch | ||
name: Deploy Release Branch | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' && endsWith(github.ref, '-dev') | ||
steps: | ||
|