diff --git a/.github/workflows/deploy-api.yml b/.github/workflows/deploy-api.yml new file mode 100644 index 0000000..d9c737e --- /dev/null +++ b/.github/workflows/deploy-api.yml @@ -0,0 +1,34 @@ +name: Deploy API + +on: + workflow_dispatch: + +jobs: + deploy-api: + runs-on: ubuntu-latest + steps: + - name: Repository Checkout + uses: actions/checkout@v4 + + - name: Setup NodeJS + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + cache: 'yarn' + + - name: Install Netlify + run: npm install netlify-cli@17.10.1 -g + + - name: Install npm dependencies + run: yarn --immutable + + - name: Deploy to Netlify + id: netlify_deploy + run: | + netlify deploy \ + --dir packages/functions \ + --filter=functions \ + --prod \ + --functions=. \ + --site ${{ secrets.NETLIFY_SITE_ID }} \ + --auth ${{ secrets.NETLIFY_API_TOKEN }}