ci: π€ fix broken nx base ref #17
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: CI | |
on: | |
push: | |
pull_request: | |
permissions: | |
actions: read | |
contents: read | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: nrwl/nx-set-shas@v3 | |
with: | |
main-branch-name: ${{ github.ref_name }} | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 10 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 24 | |
cache: pnpm | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm nx run-many -t build test lint | |
- run: pnpm nx fix-ci | |
if: always() | |
testronaut: | |
name: π§βπ Testronaut | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: nrwl/nx-set-shas@v3 | |
with: | |
main-branch-name: ${{ github.ref_name }} | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 10 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 24 | |
cache: pnpm | |
- run: pnpm install --frozen-lockfile | |
- name: Playwright browsers install | |
run: pnpm playwright install --with-deps | |
- run: pnpm nx run-many -t testronaut --parallel=1 --pass-with-no-tests | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: π Playwright Report | |
path: dist/.playwright | |
retention-days: 7 | |
deploy-gh-pages: | |
name: π Deploy to GitHub Pages | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-22.04 | |
needs: | |
- test | |
- testronaut | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
permissions: | |
pages: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 10 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 24 | |
cache: pnpm | |
- run: pnpm install --frozen-lockfile | |
- name: Build docs | |
run: pnpm nx build docs | |
- name: Upload Build Artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: docs/build | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |