publish-docs.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. name: Publish Documentation
  2. on:
  3. workflow_dispatch:
  4. branches:
  5. - master
  6. push:
  7. branches:
  8. - master
  9. paths:
  10. - 'docs/**'
  11. permissions:
  12. contents: read
  13. concurrency:
  14. group: ${{ github.workflow }}-${{ github.ref }}
  15. cancel-in-progress: true
  16. env:
  17. # Among other things, opts out of Turborepo telemetry
  18. # See https://consoledonottrack.com/
  19. DO_NOT_TRACK: '1'
  20. NEXT_TELEMETRY_DISABLED: '1'
  21. VERCEL_TELEMETRY_DISABLED: '1'
  22. # Enables Turborepo Remote Caching.
  23. TURBO_REMOTE_CACHE_SIGNATURE_KEY: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
  24. TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
  25. TURBO_TEAM: ${{ vars.TURBO_TEAM }}
  26. jobs:
  27. deploy-docs:
  28. runs-on: ubuntu-latest
  29. name: Deploy Documentation
  30. steps:
  31. - name: Checkout
  32. uses: actions/checkout@v4
  33. - name: Install Dependencies
  34. uses: ./.github/workflows/actions/install-dependencies
  35. - name: Install Isolated Docs Dependencies
  36. working-directory: ./docs/
  37. shell: bash
  38. run: pnpm install --ignore-workspace
  39. - name: Install Vercel CLI
  40. run: pnpm install -g vercel
  41. - name: Deploy to Vercel
  42. shell: bash
  43. env:
  44. VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
  45. VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
  46. VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
  47. run: |
  48. vercel pull --token="$VERCEL_TOKEN" --yes --environment=production
  49. vercel build --token="$VERCEL_TOKEN" --prod
  50. vercel deploy --token="$VERCEL_TOKEN" --archive=tgz --prebuilt --prod