Skip to content

chore: prettier 120 characters formatting changes #12

chore: prettier 120 characters formatting changes

chore: prettier 120 characters formatting changes #12

Workflow file for this run

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