Skip to content

Commit e48be3b

Browse files
committed
Only deploy to production when web changes
1 parent 7bf68f6 commit e48be3b

File tree

2 files changed

+14
-30
lines changed

2 files changed

+14
-30
lines changed

.github/workflows/deploy-production.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,27 @@ on:
44
- cron: "20 18 * * *"
55
push:
66
branches: [ master ]
7-
workflow_dispatch:
87
jobs:
98
build:
109
runs-on: ubuntu-latest
1110
steps:
12-
- uses: actions/checkout@v1
11+
- uses: actions/checkout@v4
12+
- uses: dorny/paths-filter@v2
13+
id: filter
14+
with:
15+
filters: |
16+
web:
17+
- 'src/**'
18+
- '.babelrc'
19+
- 'astro.config.mjs'
20+
- 'netlify.toml'
21+
- 'package-lock.json'
22+
- 'package.json'
23+
# run only if 'web' files were changed
1324
- name: Run deployment script
1425
env:
1526
GH_TOKEN: ${{ secrets.GH_TOKEN }}
27+
if: steps.filter.outputs.web == 'true'
1628
run: |
1729
chmod +x ./src/scripts/deploy.sh
1830
./src/scripts/deploy.sh production

.github/workflows/deploy-web-merge-test.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)