chore: debug Vercel deploy action #4
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
# .github/workflows/update-data.yml | |
name: Update Data and Deploy | |
on: | |
schedule: | |
- cron: '0 0 * * *' # Run daily at midnight UTC | |
workflow_dispatch: # Allow manual triggers | |
push: | |
branches: | |
- main | |
jobs: | |
update-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests datasette datasette-publish-vercel geojson-to-sqlite | |
npm install -g vercel | |
- name: Run update script | |
run: python script.py | |
- name: Deploy to Vercel | |
env: | |
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
run: | | |
vercel pull --yes --environment=production --token=$VERCEL_TOKEN | |
datasette publish vercel data.db \ | |
--project tampa-dev-coord \ | |
--token $VERCEL_TOKEN \ | |
--metadata metadata.json \ | |
--install datasette-geojson |