fix: isTabbedNavigationConfig checks for tabsV2 (#962) #355
Workflow file for this run
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: Vercel Production Deployment | |
env: | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }} | |
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }} | |
ALGOLIA_SEARCH_INDEX: ${{ secrets.ALGOLIA_SEARCH_INDEX }} | |
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }} | |
DATADOG_CLIENT_TOKEN: ${{ secrets.DATADOG_API_KEY }} | |
FONTAWESOME_CDN_HOST: https://fontawesome-cdn.vercel.app | |
WORKOS_API_KEY: ${{ secrets.WORKOS_API_KEY }} | |
WORKOS_CLIENT_ID: ${{ secrets.WORKOS_CLIENT_ID }} | |
JWT_SECRET_KEY: ${{ secrets.PROD_JWT_SECRET_KEY }} | |
FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
TURBO_TEAM: "buildwithfern" | |
SEGMENT_API_KEY: ${{ secrets.SEGMENT_API_KEY }} | |
on: | |
push: | |
tags: | |
- "**" | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
if: github.ref_type == 'tag' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/ui@') | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Vercel CLI | |
run: npm install --global vercel@latest | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: pnpm | |
- name: Pull Vercel Environment Information | |
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Build Project Artifacts | |
run: VERSION="$(scripts/git-version.sh)" vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Deploy Project Artifacts to Vercel | |
run: | | |
DEPLOYMENT_URL="$(vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }})" | |
echo "Deployment URL: $DEPLOYMENT_URL" | |
echo "Starting revalidation..." | |
DEPLOYMENT_URL=$(echo $DEPLOYMENT_URL | awk -F'/' '{print $3}') | |
DEPLOYMENT_INFO=$(curl -s -X GET "https://api.vercel.com/v13/deployments/$DEPLOYMENT_URL?teamId=team_6FKOM5nw037hv8g2mTk3gaH7&withGitRepoInfo=false" -H "Authorization: Bearer ${{ secrets.VERCEL_TOKEN }}") | |
ALIAS_DOMAINS=$(jq -r '.alias[]' <<< $DEPLOYMENT_INFO) | |
echo "## PR Preview" > preview.txt | |
for DOMAIN in ${ALIAS_DOMAINS[@]}; do | |
if [[ "$DOMAIN" != *"buildwithfern.com"* ]] && [[ "$DOMAIN" != *"vercel.app"* ]]; then | |
curl -s -X POST "https://$DOMAIN/api/revalidate-all" -H "x-fern-host: $DOMAIN" | |
echo "Revalidated: $DOMAIN" | |
fi | |
done | |
curl -s -X POST https://docs.buildwithfern.com/api/revalidate-all -H "x-fern-host: docs.buildwithfern.com" | |
echo "Revalidated: docs.buildwithfern.com" | |
echo "Done!" | |
- name: Install datadog-ci | |
run: pnpm install --global @datadog/datadog-ci | |
- name: Upload sourcemap | |
run: | | |
datadog-ci sourcemaps upload ./packages/ui/docs-bundle/.next/static \ | |
--service=docs-frontend \ | |
--release-version="$(scripts/git-version.sh)" \ | |
--minified-path-prefix=https://app.buildwithfern.com/_next/static | |
env: | |
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }} | |
smoke-test: | |
needs: deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Smoke Test | |
env: | |
NPM_TOKEN: ${{ secrets.FERN_NPM_TOKEN }} | |
FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
run: | | |
cd smoke-test | |
npm install -g fern-api | |
fern generate --docs --instance https://fern-platform-test.docs.buildwithfern.com | |
VALUE=$(curl https://fern-platform-test.docs.buildwithfern.com/api-reference/imdb/create-movie) | |
length=${#VALUE} | |
# Assert that length is over 1000 | |
if [ $length -gt 1000 ]; then | |
echo "Length is greater than 1000" | |
else | |
exit 1 | |
fi | |
healthchecks: | |
needs: deploy | |
uses: ./.github/workflows/healthcheck.yml | |
secrets: inherit |