Skip to content

Migrate to tailwind #884

Migrate to tailwind

Migrate to tailwind #884

Workflow file for this run

name: Build and Deploy
on: ['push', 'pull_request']
jobs:
build:
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
strategy:
matrix:
node-version: [16]
react-version: [18]
steps:
- name: Branch Name
run: echo Running on branch ${GITHUB_REF##*/}
- name: Begin CI...
uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Install Playwright
run: npx playwright install --with-deps
- name: Test
run: pnpm run test
- name: Build
run: pnpm run build
- name: Run Playwright tests
run: pnpm run test:e2e
- uses: actions/upload-artifact@v3
if: failure()
with:
name: playwright-test-result ${{ matrix.node-version }} ${{ matrix.react-version }}
path: |
examples/subpath-example/test-results/
examples/subpath-example/trace.zip
examples/react-example/test-results/
examples/react-example/trace.zip
if-no-files-found: ignore
retention-days: 2
- name: Deploy Docs to Netlify
uses: nwtgck/[email protected]
if: matrix.react-version == 18
with:
publish-dir: docs/showroom
production-deploy: ${{ github.ref == 'refs/heads/main'}}
production-branch: main
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: 'Deploy from GitHub Actions'
github-deployment-environment: Docs
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
- name: Deploy SSR Example to Netlify
uses: nwtgck/[email protected]
if: matrix.react-version == 18
with:
publish-dir: examples/react-example/showroom
production-deploy: ${{ github.ref == 'refs/heads/main'}}
production-branch: main
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: 'Deploy from GitHub Actions'
github-deployment-environment: Prerender Example
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SSR_EXAMPLE_SITE_ID }}
- name: Deploy SPA Example to Netlify
uses: nwtgck/[email protected]
if: matrix.react-version == 18
with:
publish-dir: examples/react-example/showroom-spa
production-deploy: ${{ github.ref == 'refs/heads/main'}}
production-branch: main
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: 'Deploy from GitHub Actions'
github-deployment-environment: Non-Prerender Example
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SPA_EXAMPLE_SITE_ID }}
- name: Deploy Subpath Example to Netlify
uses: nwtgck/[email protected]
if: matrix.react-version == 18
with:
publish-dir: examples/subpath-example/public
production-deploy: ${{ github.ref == 'refs/heads/main'}}
production-branch: main
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: 'Deploy from GitHub Actions'
github-deployment-environment: Subpath Example
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SUBPATH_EXAMPLE_SITE_ID }}
- name: Deploy Client Only Example to Netlify
uses: nwtgck/[email protected]
if: matrix.react-version == 18
with:
publish-dir: examples/client-only-example/showroom
production-deploy: ${{ github.ref == 'refs/heads/main'}}
production-branch: main
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: 'Deploy from GitHub Actions'
github-deployment-environment: Client Only Example
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_CLIENT_ONLY_SITE_ID }}
- name: Deploy CRA 5 Only Example to Netlify
uses: nwtgck/[email protected]
if: matrix.react-version == 18
with:
publish-dir: examples/cra-example/showroom
production-deploy: ${{ github.ref == 'refs/heads/main'}}
production-branch: main
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: 'Deploy from GitHub Actions'
github-deployment-environment: CRA 5 Example
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_CRA5_EXAMPLE_SITE_ID }}