chore(main): Release transformation-aws-compliance-premium v1.13.4 #1972
This file contains 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: Deploy dbt docs | |
env: | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
CLOUDQUERY_API_KEY: ${{ secrets.CLOUDQUERY_API_KEY }} | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
generate-docs: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
shard: [ | |
1, 2, 3, 4, | |
5, 6, 7, 8, | |
9, 10 | |
] | |
timeout-minutes: 30 | |
services: | |
postgres: | |
image: postgres:11 | |
env: | |
POSTGRES_PASSWORD: pass | |
POSTGRES_USER: postgres | |
POSTGRES_DB: postgres | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.9" | |
- name: Install dbt packages | |
run: pip install dbt-postgres | |
- name: Setup CloudQuery | |
uses: cloudquery/setup-cloudquery@v4 | |
with: | |
version: v6.4.1 | |
- name: Generate the docs | |
run: make shard=${{ matrix.shard }} gen-site | |
env: | |
CQ_DSN: postgresql://postgres:pass@localhost:5432/postgres | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: docs-artifact-${{ matrix.shard }} | |
path: "*.html" | |
deploy-preview: | |
if: github.event_name == 'pull_request' | |
needs: generate-docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: docs-artifact-* | |
path: actions-checkout-file-path | |
merge-multiple: true | |
- run: mv actions-checkout-file-path/*.html dbt-docs-site | |
- name: Install Vercel CLI | |
run: npm install --global vercel@latest | |
- name: Pull Vercel Environment Information | |
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Build Project Artifacts | |
run: vercel build --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Deploy Project Artifacts to Vercel | |
run: vercel deploy --no-wait --prebuilt --token=${{ secrets.VERCEL_TOKEN }} | |
deploy-prod: | |
if: github.event_name == 'push' | |
needs: generate-docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: docs-artifact-* | |
path: actions-checkout-file-path | |
merge-multiple: true | |
- run: mv actions-checkout-file-path/*.html dbt-docs-site | |
- name: Install Vercel CLI | |
run: npm install --global vercel@latest | |
- name: Pull Vercel Environment Information | |
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Build Project Artifacts | |
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Deploy Project Artifacts to Vercel | |
run: vercel deploy --prod --no-wait --prebuilt --token=${{ secrets.VERCEL_TOKEN }} |