Skip to content

feat: docs deployment #1

feat: docs deployment

feat: docs deployment #1

Workflow file for this run

name: "Deploy Clutch docs to vercel"
on:
push:
paths:
- docs/**
- .github/workflows/deploy-docs.yml
jobs:
check-bats-version:
runs-on: ubuntu-latest
steps:
- name: Vercel CLI
shell: bash
run: |
cd docs
pnpm install --global vercel@latest
- name: Vercel Pull
shell: bash
run: |
cd docs
vercel pull --token ${{ secrets.VERCEL_CI_TOKEN }} --scope clutch-creator --yes
- name: Build
shell: bash
run: |
cd docs
vercel build --token ${{ secrets.VERCEL_CI_TOKEN }} --prod
- name: Deploy
shell: bash
run: |
cd docs
vercel deploy --prod --prebuilt --token ${{ secrets.VERCEL_CI_TOKEN }} --scope clutch-creator --yes
- name: Update deployment domain
shell: bash
run: |
STATUS_CODE=$(curl -s -o /dev/null -w "%{http_code}" --location 'https://api.vercel.com/v9/projects/docs/domains/docs.clutch.show?teamId=clutch-creator' --header 'Authorization: Bearer ${{ secrets.VERCEL_CI_TOKEN }}')
if [ $STATUS_CODE -eq 200 ]; then
echo "Domain already exists"
exit 0
fi
cd docs
vercel domains add 'docs.clutch.io' --token ${{ secrets.VERCEL_CI_TOKEN }} --scope clutch-creator