name: Pages on: push: branches: [main] workflow_dispatch: permissions: contents: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: deploy: name: Build and publish Pages if: github.ref == 'refs/heads/main' 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 - name: Install dependencies run: pnpm install --frozen-lockfile - name: Build admin and documentation 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 }} - name: Publish combined site to dist uses: JamesIves/github-pages-deploy-action@v4.9.0 with: branch: dist folder: dist/pages