Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(ci): Trigger docs site deployments. #8948

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/deploy-docs-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy docs

env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

on:
push:
branches:
- main
paths:
- "docs/**"
pull_request:
paths:
- "docs/**"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
deploy-preview:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v2

- name: Install Vercel CLI
run: npm install --global vercel@latest

- name: Create preview deployment
run: vercel deploy --cwd=docs --token=${{ secrets.VERCEL_TOKEN }}

deploy-production:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v2

- name: Install Vercel CLI
run: npm install --global vercel@latest

- name: Create production deployment
run: vercel deploy --cwd=docs --token=${{ secrets.VERCEL_TOKEN }}
5 changes: 5 additions & 0 deletions docs/repo-docs/guides/ci-vendors/circleci.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ And a `turbo.json`:
```json title="./turbo.json"
{
"$schema": "https://turbo.build/schema.json",
"globalPassThroughEnv": ["CIRCLECI", "CIRCLE_*"],
"tasks": {
"build": {
"outputs": [".next/**", "!.next/cache/**"],
Expand All @@ -45,6 +46,10 @@ And a `turbo.json`:
}
}
}

<Callout type="info">
Note the `globalPassThroughEnv` configuration. This allows CircleCI's environment variables into the task's runtime when using [Strict Mode](https://turbo.build/repo/docs/crafting-your-repository/using-environment-variables#strict-mode).
</Callout>
```

Create a file called `.circleci/config.yml` in your repository with the following contents:
Expand Down
Loading