Merge pull request #20 from litestar-org/ci/pr #52
This file contains hidden or 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: Deploy to GitHub Pages | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: pages-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| prepare-plugin-data: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Upload workspace | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: workspace-with-plugins | |
| path: . | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - run: corepack enable | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| cache: 'pnpm' | |
| - run: pnpm install --frozen-lockfile | |
| - name: Format check | |
| run: pnpm format:check | |
| - name: Lint | |
| run: pnpm lint:check | |
| test: | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - run: corepack enable | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| cache: 'pnpm' | |
| - run: pnpm install --frozen-lockfile | |
| - name: Tests (unit + nuxt) | |
| run: pnpm test-all | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| build: | |
| needs: [prepare-plugin-data, lint, test] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download workspace | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: workspace-with-plugins | |
| path: . | |
| - run: corepack enable | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| - run: pnpm install --frozen-lockfile | |
| - name: Update stats | |
| run: pnpm run update-stats | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - run: pnpm run generate-github | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NUXT_APP_BASE_URL: /litestar.dev-v2/ | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: ./.output/public | |
| deploy: | |
| needs: build | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v5 |