Skip to content

Commit

Permalink
chore(ci): trying to reuse workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
planctus committed Oct 4, 2024
1 parent 4f1b1dc commit 9c5af20
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

audit:
name: audit
runs-on: ubuntu-latest
Expand All @@ -26,6 +27,7 @@ jobs:
node-version: 20.9.0
- name: Test
run: ./scripts/audit.sh

tests:
name: tests
runs-on: ubuntu-latest
Expand All @@ -42,6 +44,7 @@ jobs:
run: yarn build:presets
- name: Test
run: yarn test

size:
name: size
runs-on: ubuntu-latest
Expand All @@ -56,8 +59,9 @@ jobs:
run: yarn dist:presets
- name: Test
run: yarn size-limit

deploy-pull-request-preview:
name: deploy preview
name: Deploy Preview
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
Expand All @@ -73,6 +77,7 @@ jobs:
run: yarn build:icons
- name: Package application
run: yarn dist
- uses: jpoehnelt/reusable-workspace/save@v1
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
Expand All @@ -83,22 +88,37 @@ jobs:
NETLIFY: true
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
- name: Run Chromatic for EC
uses: chromaui/action@latest

chromatic-ec:
name: Run Chromatic for EC
needs: deploy-pull-request-preview
runs-on: ubuntu-latest
steps:
- uses: jpoehnelt/reusable-workspace/restore@v1
- uses: actions/checkout@v4
- 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

chromatic-eu:
name: Run Chromatic for EU
needs: deploy-pull-request-preview
runs-on: ubuntu-latest
steps:
- uses: jpoehnelt/reusable-workspace/restore@v1
- uses: actions/checkout@v4
- 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:
Expand Down

0 comments on commit 9c5af20

Please sign in to comment.