Skip to content

Feat(documentation): remaining pages and teaser #783

Feat(documentation): remaining pages and teaser

Feat(documentation): remaining pages and teaser #783

name: Deploy site (main) to GitHub Pages
on:
pull_request:
push:
branches: ['main']
permissions:
contents: write
pages: write
id-token: write
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: 🖼️ Display node and pnpm version
shell: bash
run: |
node --version
pnpm --version
- name: Install deps
run: pnpm install --frozen-lockfile
- name: Lint
run: |
pnpm run lint
- name: Build
env:
ASSET_PASSWORD: ${{ secrets.ASSET_PASSWORD }}
ASSET_INIT_VECTOR: ${{ secrets.ASSET_INIT_VECTOR }}
FIGMA_TOKEN: ${{ secrets.FIGMA_TOKEN }}
run: |
pnpm run decode-db-theme-assets
if [ "${{ github.event_name }}" != "pull_request" ]; then pnpm run cache:figma; fi
pnpm run build
- name: Playwright
id: playwright
continue-on-error: ${{ github.event_name == 'pull_request' }}
run: |
npx playwright install --with-deps chromium
pnpm run test
- name: Playwright regenerate snapshots
if: steps.playwright.outcome == 'failure' && github.event_name == 'pull_request'
id: playwright-regenerate
run: pnpm run test:regenerate
- name: 🚘 Auto commit
if: steps.playwright-regenerate.outcome == 'success' && github.event_name == 'pull_request'
uses: ./.github/actions/auto-commit
with:
branch-name: '${{ github.head_ref }}-auto'
commit-message: 'auto update snapshots'
commit-files: 'tests/*-snapshots/*'
auto-merge-app-id: ${{ vars.AUTO_MERGE_APP_ID }}
auto-merge-private-key: ${{ secrets.AUTO_MERGE_PRIVATE_KEY }}
gh-token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure Pages
if: ${{github.event_name != 'pull_request'}}
uses: actions/configure-pages@v5
- name: Upload artifact
if: ${{github.event_name != 'pull_request'}}
uses: actions/upload-pages-artifact@v3
with:
path: public
deploy:
needs: build
if: ${{github.event_name != 'pull_request'}}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4