Skip to content

Commit

Permalink
fix: netlify requires choosing a package now?
Browse files Browse the repository at this point in the history
  • Loading branch information
ForbesLindesay committed Jan 12, 2024
1 parent 94be291 commit 87cf8aa
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
26 changes: 16 additions & 10 deletions .github/workflows-src/website.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
},
});
);
});
});
});
5 changes: 3 additions & 2 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit 87cf8aa

Please sign in to comment.