refactor: new navigation node structure (#942) #1013
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 Development 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 }} | |
FONTAWESOME_CDN_HOST: https://fontawesome-cdn.vercel.app | |
WORKOS_API_KEY: ${{ secrets.WORKOS_STAGING_API_KEY }} | |
WORKOS_CLIENT_ID: ${{ secrets.WORKOS_STAGING_CLIENT_ID }} | |
JWT_SECRET_KEY: ${{ secrets.DEV_JWT_SECRET_KEY }} | |
FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: "buildwithfern" | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- 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: Install Vercel CLI | |
run: npm install --global vercel@latest | |
- name: Pull Vercel Environment Information | |
run: vercel pull --yes --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Build Project Artifacts | |
run: VERSION="$(scripts/git-version.sh)" ENABLE_SOURCE_MAPS=true vercel build --debug --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Deploy Project Artifacts to Vercel | |
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} | |
smoke-test: | |
needs: deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Smoke Test Dev Docs | |
env: | |
NPM_TOKEN: ${{ secrets.FERN_NPM_TOKEN }} | |
FERN_TOKEN: ${{ secrets.FERN_ORG_TOKEN_DEV }} | |
run: | | |
cd smoke-test | |
npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN | |
npm install -g @fern-api/fern-api-dev | |
fern-dev generate --docs --instance https://fern-platform-test.docs.dev.buildwithfern.com | |
VALUE=$(curl https://fern-platform-test.docs.dev.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 |