Download from NUFORC #175
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: Download from NUFORC | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '0 7 * * 1' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout dataherb-flora | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.ACCESS_TOKEN }} | |
- name: Get current directory and files | |
run: | | |
pwd | |
ls | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install Python Requirements | |
run: | | |
pip install requests | |
pip install bs4 | |
pip install lxml | |
pip install pandas | |
- name: Download new data | |
run: | | |
cd dataset | |
python ../scripts/download.py | |
- name: Update Data | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git status | |
git add . | |
git commit -m "Update Datasets" || echo "Nothing to update" | |
git status | |
- name: Push changes to repo | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.ACCESS_TOKEN }} | |
branch: master |