diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 848a8bf..7853971 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -1,18 +1,24 @@ -name: Deploy Documentation +name: Deploy Docs to GitHub Pages on: + # Runs on pushes targeting the default branch push: - branches: [main] + branches: ["main"] paths: - 'apps/docs/**' - '.github/workflows/deploy-docs.yml' + + # Allows you to run this workflow manually from the Actions tab workflow_dispatch: +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: contents: read pages: write id-token: write +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. concurrency: group: "pages" cancel-in-progress: false @@ -27,13 +33,13 @@ jobs: - name: Setup pnpm uses: pnpm/action-setup@v4 with: - version: 9 + version: 9.0.0 - name: Setup Node uses: actions/setup-node@v4 with: - node-version: 18 - cache: 'pnpm' + node-version: "18" + cache: "pnpm" - name: Setup Pages uses: actions/configure-pages@v4 @@ -41,15 +47,13 @@ jobs: - name: Install dependencies run: pnpm install --frozen-lockfile - - name: Build docs - run: | - cd apps/docs - pnpm build + - name: Build with Turbo + run: pnpm turbo build --filter=docs - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: - path: apps/docs/dist + path: ./apps/docs/dist deploy: environment: @@ -61,4 +65,3 @@ jobs: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 -