Browse Source

fix: docs preview (#163)

* fix: docs preview

* fix: build too
Nick Frostbutter 5 months ago
parent
commit
d100c7bfee
1 changed files with 7 additions and 7 deletions
  1. 7 7
      .github/workflows/preview-docs.yml

+ 7 - 7
.github/workflows/preview-docs.yml

@@ -3,7 +3,7 @@ name: Preview Documentation
 on:
   pull_request:
     paths:
-      - 'docs/**'
+      - "docs/**"
 
 permissions:
   contents: read
@@ -11,9 +11,9 @@ permissions:
 env:
   # Among other things, opts out of Turborepo telemetry
   # See https://consoledonottrack.com/
-  DO_NOT_TRACK: '1'
-  NEXT_TELEMETRY_DISABLED: '1'
-  VERCEL_TELEMETRY_DISABLED: '1'
+  DO_NOT_TRACK: "1"
+  NEXT_TELEMETRY_DISABLED: "1"
+  VERCEL_TELEMETRY_DISABLED: "1"
   # Some tasks slow down considerably on GitHub Actions runners when concurrency is high
   TURBO_CONCURRENCY: 1
   # Enables Turborepo Remote Caching.
@@ -54,8 +54,8 @@ jobs:
           VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
         run: |
           vercel pull --token="$VERCEL_TOKEN" --yes --environment=preview
-          vercel build --token="$VERCEL_TOKEN" --prod=false
-          DEPLOY_OUTPUT=$(vercel deploy --token="$VERCEL_TOKEN" --archive=tgz --env GITHUB_PR_NUMBER="$PR_NUMBER" --env GITHUB_PR_BRANCH="$BRANCH_NAME" --prebuilt --prod=false 2>&1)
+          vercel build --token="$VERCEL_TOKEN" --target=preview
+          DEPLOY_OUTPUT=$(vercel deploy --token="$VERCEL_TOKEN" --archive=tgz --env GITHUB_PR_NUMBER="$PR_NUMBER" --env GITHUB_PR_BRANCH="$BRANCH_NAME" --prebuilt --target=preview 2>&1)
           DEPLOY_EXIT_CODE=$?
           if [ $DEPLOY_EXIT_CODE -ne 0 ]; then
             echo "Vercel deploy failed:"
@@ -69,6 +69,6 @@ jobs:
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           PR_NUMBER: ${{ github.event.pull_request.number }}
-          PREVIEW_URL: '${{ steps.vercel_deploy.outputs.preview_url }}'
+          PREVIEW_URL: "${{ steps.vercel_deploy.outputs.preview_url }}"
         run: |
           gh pr comment $PR_NUMBER --body "Documentation Preview: $PREVIEW_URL" --create-if-none --edit-last