Merge branch 'minor-fixes' #50
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: Get and group data | |
on: | |
schedule: | |
- cron: '0 4 5 * *' | |
push: | |
branches-ignore: | |
- 'gh-pages' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup python version | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies && generate data for Osmose | |
run: | | |
./install.sh | |
export PATH=$PATH:$PWD/ | |
xsv --version | |
mkdir output | |
wget https://www.data.gouv.fr/fr/datasets/r/2729b192-40ab-4454-904d-735084dca3a3 --no-verbose --output-document=opendata_irve.csv 2>&1 | |
python group_opendata_by_station.py | |
#fail if less than 2 lines | |
test `cat output/opendata_stations.csv | xsv count` -ge 2 | |
cat output/opendata_stations.csv |xsv select nom_operateur,nom_enseigne |xsv sort |uniq > output/opendata_networks.csv | |
- name: Deploy | |
if: ${{ github.ref == 'refs/heads/master' }} | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: output |