From 87cf8aafa08cb2cb94bd2aed9689c0aff58f7634 Mon Sep 17 00:00:00 2001 From: Forbes Lindesay Date: Fri, 12 Jan 2024 18:06:23 +0000 Subject: [PATCH] fix: netlify requires choosing a package now? --- .github/workflows-src/website.ts | 26 ++++++++++++++++---------- .github/workflows/website.yml | 5 +++-- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/.github/workflows-src/website.ts b/.github/workflows-src/website.ts index 00616faf..b1d638a1 100644 --- a/.github/workflows-src/website.ts +++ b/.github/workflows-src/website.ts @@ -32,20 +32,26 @@ export default createWorkflow(({setWorkflowName, addTrigger, addJob}) => { run('yarn workspace @databases/website build'); when(eq(github.event_name, `push`), () => { - run(`cd packages/website && netlify deploy --prod --dir=out`, { - env: { - NETLIFY_SITE_ID: secrets.NETLIFY_SITE_ID, - NETLIFY_AUTH_TOKEN: secrets.NETLIFY_AUTH_TOKEN, + run( + `netlify deploy --filter @databases/website --prod --dir=packages/website/out`, + { + env: { + NETLIFY_SITE_ID: secrets.NETLIFY_SITE_ID, + NETLIFY_AUTH_TOKEN: secrets.NETLIFY_AUTH_TOKEN, + }, }, - }); + ); }); when(neq(github.event_name, `push`), () => { - run(`cd packages/website && netlify deploy --dir=out`, { - env: { - NETLIFY_SITE_ID: secrets.NETLIFY_SITE_ID, - NETLIFY_AUTH_TOKEN: secrets.NETLIFY_AUTH_TOKEN, + run( + `netlify deploy --filter @databases/website --dir=packages/website/out`, + { + env: { + NETLIFY_SITE_ID: secrets.NETLIFY_SITE_ID, + NETLIFY_AUTH_TOKEN: secrets.NETLIFY_AUTH_TOKEN, + }, }, - }); + ); }); }); }); diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 209211af..4898517a 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -155,12 +155,13 @@ jobs: restore-keys: next- - run: yarn workspace @databases/website build - if: ${{ github.event_name == 'push' }} - run: cd packages/website && netlify deploy --prod --dir=out + run: netlify deploy --filter @databases/website --prod + --dir=packages/website/out env: NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - if: ${{ github.event_name != 'push' }} - run: cd packages/website && netlify deploy --dir=out + run: netlify deploy --filter @databases/website --dir=packages/website/out env: NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}