Skip to content

fix: Reduce open handles (#57) #71

fix: Reduce open handles (#57)

fix: Reduce open handles (#57) #71

Workflow file for this run

name: Run Tests and Generate Docs
on:
push:
branches:
- main
jobs:
test-and-docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: "0" # fetch all history for all tags and branches so that changeset-builder can generate changelogs
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
scope: "@differentialhq"
- name: Install dependencies on root
run: npm install
- name: Set DIFFERENTIAL_API_SECRET
run: echo "DIFFERENTIAL_API_SECRET=$(curl https://api.differential.dev/demo/token)" >> $GITHUB_ENV
- name: Run tests
run: npx lerna run test
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
JWKS_URL: ${{ secrets.JWKS_URL }}
- name: Configure Git User
run: |
git config --global user.name "Differential CI"
git config --global user.email "ci@differential.dev"
- name: Generate docs
run: |
make docs
git add .
git commit -m "chore: Update documentation [skip ci]" || true # ignore if there's nothing to commit
git push origin main
- name: Build packages
run: npx lerna run build
- uses: retypeapp/action-build@latest
with:
config: docs
- uses: retypeapp/action-github-pages@latest
with:
update-branch: true
deploy:
name: deploy
runs-on: ubuntu-latest
needs: test-and-docs
steps:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: cd control-plane && flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}