fix command for fly publish #5
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: Generate and Publish Database | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Download XML zip file | |
run: | | |
curl -O http://ratings.fide.com/download/players_list_xml.zip | |
- name: Unzip XML file | |
run: | | |
unzip players_list_xml.zip -d ./ | |
mv players_list_xml_foa.xml players.xml | |
- name: Generate SQLite database | |
run: | | |
python players.py players.xml players.db | |
- name: Generate metadata.json | |
run: | | |
python generate_metadata.py | |
- name: Deploy to Fly.io using Datasette | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
run: | | |
datasette publish fly players.db --app="fide-players" -m metadata.json |