Skip to content

Commit

Permalink
Merge pull request #3454 from cal-itp/fix/erroneous-maps-app-deploys
Browse files Browse the repository at this point in the history
fix(ci): only deploy maps app previews on relevant pull requests
  • Loading branch information
themightychris authored Sep 13, 2024
2 parents 87e570d + 16f023a commit 1202708
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/deploy-apps-maps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ name: Build and publish apps/maps

on:
push:
branches:
- 'main'
paths:
- '.github/workflows/deploy-apps-maps.yml'
- 'apps/maps/**'
pull_request:
paths:
- '.github/workflows/deploy-apps-maps.yml'
- 'apps/maps/**'
workflow_dispatch:

Expand Down Expand Up @@ -34,7 +38,7 @@ jobs:

# Preview on PRs
- name: Deploy apps/maps preview to Netlify
if: ${{ github.ref != 'refs/heads/main' }}
if: ${{ github.event_name == 'pull_request' }}
run: |
npm install -g netlify-cli
netlify deploy --site=embeddable-maps-calitp-org --dir=apps/maps/build --alias=${GITHUB_REPOSITORY#*/}-${PR_NUMBER}
Expand Down

0 comments on commit 1202708

Please sign in to comment.