fix(theme): rework how the default theme must be installed #235
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
name: Build website | |
on: | |
push: | |
pull_request: | |
branches: [main] | |
types: [opened, synchronize, closed] | |
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
concurrency: | |
group: build | |
cancel-in-progress: false | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: yarn | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
- name: Install dependencies | |
run: yarn install | |
- name: Run linter | |
run: yarn lint | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: yarn | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
- name: Install dependencies | |
run: yarn install | |
- name: Run test | |
run: yarn test | |
test-storybook: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: yarn | |
- name: Install dependencies 🚀 | |
run: yarn install --immutable | |
- name: Install Playwright 🚀 | |
run: yarn playwright install | |
- name: Build Storybook | |
run: yarn storybook:build --quiet | |
- name: Serve Storybook and run tests 🔍 | |
run: | | |
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \ | |
"npx http-server storybook-static --port 6006 --silent" \ | |
"npx wait-on tcp:6006 && yarn storybook:test:ci" | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: yarn | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
- name: Install dependencies | |
run: yarn install | |
- name: Build with VitePress | |
run: yarn docs:build | |
deploy-packages: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # Required for creating releases | |
packages: write # Required for publishing packages | |
issues: write # Required for release notes | |
pull-requests: write # Required for release note | |
needs: | |
[lint, build, test, test-storybook] | |
strategy: | |
fail-fast: true | |
if: github.event_name != 'pull_request' && contains(' | |
refs/heads/main | |
refs/heads/alpha | |
refs/heads/beta | |
refs/heads/rc | |
', github.ref) | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: yarn | |
- name: Install dependencies | |
run: yarn install --network-timeout 500000 | |
- name: Release packages | |
env: | |
CI: true | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
run: YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn release |