feat: map minimum height of 200px (#213) #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Demos and push to main | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- 'src/**' | |
- 'public/**' | |
- 'datasets/**' | |
- 'package.json' | |
- 'package-lock.json' | |
workflow_dispatch: # manual trigger when needed | |
permissions: | |
contents: write | |
jobs: | |
build-and-deploy: | |
if: github.repository == 'googlemaps/fleet-debugger' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ssh-key: ${{ secrets.DEPLOY_KEY }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm install | |
- name: Build and Update Demos | |
env: | |
CI: false | |
run: | | |
# Build Jump demo | |
echo "Building Jump demo..." | |
rm -rf demos/jump | |
cp datasets/jump-demo.json public/data.json | |
npm run build | |
cp -r build demos/jump | |
# Build LMFS demo | |
echo "Building LMFS demo..." | |
rm -rf demos/lmfs | |
cp datasets/lmfs.json public/data.json | |
npm run build | |
cp -r build demos/lmfs | |
# Build Multiple Trips demo | |
echo "Building Multiple Trips demo..." | |
rm -rf demos/multiple-trips | |
cp datasets/two-trips-bay-area.json public/data.json | |
npm run build | |
cp -r build demos/multiple-trips | |
- name: Commit and Push Changes | |
run: | | |
echo "Configuring git..." | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
echo "Stashing changes..." | |
git stash | |
echo "Pulling latest changes..." | |
git pull origin main --rebase | |
echo "Applying stashed changes..." | |
git stash pop | |
echo "Adding and committing changes..." | |
git add demos/ | |
git commit -m "Update demo builds" || echo "No changes to commit" | |
echo "Pushing changes..." | |
git push |