Merge branch 'feat/co-located-cms' #124
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: Docs | |
| on: | |
| pull_request: | |
| paths: | |
| - 'docs/**' | |
| - 'apps/*/docs/**' | |
| - 'packages/*/docs/**' | |
| - 'apps/docs/**' | |
| - 'apps/**/src/**' | |
| - 'packages/**/src/**' | |
| - 'apps/docs/typedoc.config.mjs' | |
| - 'apps/docs/tsconfig.typedoc.json' | |
| - 'pnpm-lock.yaml' | |
| - '.github/workflows/docs.yml' | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| env: | |
| CI: true | |
| TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
| TURBO_TEAM: ${{ vars.TURBO_TEAM }} | |
| jobs: | |
| build: | |
| name: 🔨 Build Docs | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: 🕶️ Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: 🚀 Bootstrap | |
| uses: ./.github/common/bootstrap | |
| - name: 🔨 Build Packages | |
| run: pnpm run build:packages | |
| - name: 🔨 Build Docs | |
| run: pnpm --filter @nordcom/commerce-docs build | |
| - name: 📦 Upload built site | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: docs-build | |
| path: apps/docs/build | |
| retention-days: 1 | |
| - name: ⚙️ Configure Pages | |
| if: github.event_name != 'pull_request' | |
| uses: actions/configure-pages@v6 | |
| - name: 📦 Upload Pages Artifact | |
| if: github.event_name != 'pull_request' | |
| uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: apps/docs/build | |
| e2e: | |
| name: 🧪 E2E | |
| needs: build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: 🕶️ Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: 🚀 Bootstrap | |
| uses: ./.github/common/bootstrap | |
| - name: 📥 Download built site | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: docs-build | |
| path: apps/docs/build | |
| - name: 🎭 Install Playwright browsers | |
| run: pnpm --filter @nordcom/commerce-docs exec playwright install --with-deps chromium webkit | |
| - name: 🧪 Run Playwright tests against built site | |
| working-directory: apps/docs | |
| env: | |
| DOCS_BASE_URL: http://localhost:3003 | |
| DOCS_SERVE_COMMAND: pnpm exec docusaurus serve --port 3003 --no-open | |
| run: pnpm exec playwright test | |
| - name: 📦 Upload Playwright report | |
| if: failure() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: playwright-report | |
| path: apps/docs/playwright-report | |
| retention-days: 7 | |
| deploy: | |
| name: 🚀 Deploy to GitHub Pages | |
| needs: [build, e2e] | |
| if: github.event_name != 'pull_request' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: 🚀 Deploy | |
| id: deployment | |
| uses: actions/deploy-pages@v5 |