name: CI on: push: pull_request: workflow_dispatch: permissions: contents: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: check: name: Check (${{ matrix.os }}) runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] steps: - uses: actions/checkout@v7.0.1 - uses: actions/setup-node@v7.1.0 with: node-version-file: .nvmrc - uses: pnpm/action-setup@v6.1.0 - name: Install dependencies run: pnpm install --frozen-lockfile - name: Check the app and documentation workspace run: pnpm check deploy: name: Deploy main to dist branch if: github.event_name == 'push' && github.ref == 'refs/heads/main' needs: check runs-on: ubuntu-latest permissions: contents: write steps: - uses: actions/checkout@v7.0.1 - uses: actions/setup-node@v7.1.0 with: node-version-file: .nvmrc - uses: pnpm/action-setup@v6.1.0 - run: pnpm install --frozen-lockfile - run: pnpm pages:build env: RAY_TEMPLATE_SITE_ORIGIN: ${{ github.repository == 'XiaoDaiGua-Ray/ray-template' && 'https://xiaodaigua-ray.github.io' || vars.RAY_TEMPLATE_SITE_ORIGIN }} RAY_TEMPLATE_SOURCE_REF: ${{ github.sha }} - uses: JamesIves/github-pages-deploy-action@v4.9.0 with: branch: dist folder: dist/pages