Skip to content

fix: remove 404 page, throw error in getDocsPageProps (#704) #11

fix: remove 404 page, throw error in getDocsPageProps (#704)

fix: remove 404 page, throw error in getDocsPageProps (#704) #11

Workflow file for this run

name: Deploy FDR
on:
push:
tags: ["*"]
env:
PACKAGE_NAME: "@fern-platform/fdr"
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: "buildwithfern"
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
FERNIE_SLACK_APP_TOKEN: ${{ secrets.FERNIE_SLACK_APP_TOKEN }}
GITHUB_TOKEN: ${{ secrets.FERN_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.FERN_NPM_TOKEN }}
jobs:
sdk:
if: github.ref_type == 'tag' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/fdr@')
uses: ./.github/workflows/publish-fdr-sdk.yml
deploy_prod:
strategy:
matrix:
concurrency: [1]
runs-on: ubuntu-latest
if: github.ref_type == 'tag' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/fdr@')
environment: Fern Prod
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}/fdr?schema=public
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
ALGOLIA_ADMIN_API_KEY: ${{ secrets.ALGOLIA_ADMIN_API_KEY }}
ALGOLIA_SEARCH_INDEX: ${{ secrets.ALGOLIA_SEARCH_INDEX }}
ALGOLIA_SEARCH_API_KEY: ${{ secrets.ALGOLIA_SEARCH_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: 📥 Install
uses: ./.github/actions/install
- name: 🪴 Generate Code
run: |
pnpm fern generate --local --api fdr --group local --log-level debug
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
- name: 🧪 Build and test
run: pnpm turbo build test --filter=${{ env.PACKAGE_NAME }}
- name: 💻 Setup AWS CLI
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
# Currently we migrate in the Docker container
# - name: 🔄 DB Migration
# run: pnpm run --filter=@fern-platform/fdr db:migrate:prod
# env:
# DATABASE_URL: ${{ secrets.DATABASE_URL }}/fdr?schema=public
- name: 🚀 cdk deploy
run: |
git_version="$(scripts/git-version.sh)"
pnpm run --filter=@fern-platform/fdr docker:prod "${git_version}"
npm install -g aws-cdk
cd servers/fdr-deploy
VERSION="${git_version}" pnpm --filter=@fern-platform/fdr-deploy deploy:prod
smoke-test:
needs: deploy_prod
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 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