Skip to content

Commit 8db76f7

Browse files
Publish locked Netlify production deploys
Let Netlify build production deploys and have GitHub Actions publish the matching deploy only after CI passes.
1 parent 04eb1f4 commit 8db76f7

6 files changed

Lines changed: 913 additions & 10 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,8 @@ jobs:
7272
- name: Install dependencies
7373
run: npm install
7474

75-
- name: Build app
76-
run: npm run build
77-
78-
- name: Deploy to Netlify
79-
run: |
80-
deploy_message="$(git log -1 --pretty=%s)"
81-
npx --yes netlify-cli deploy --prod --dir=dist --site \
82-
"$NETLIFY_SITE_ID" --auth "$NETLIFY_AUTH_TOKEN" \
83-
--message "$deploy_message"
75+
- name: Publish Netlify production deploy
76+
run: npx tsx src/scripts/publish-netlify-production-deploy.ts
8477
env:
8578
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
8679
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}

netlify.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
[build]
22
command = "npm run build"
3-
ignore = "[ \"$CONTEXT\" = \"production\" ]"
43
publish = "dist/"

0 commit comments

Comments
 (0)