chore: move notebooks #41
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: CI | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: "0 10 * * 1" | |
workflow_dispatch: | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
cache: pip | |
- name: Install dependencies | |
run: | | |
pip install -e . | |
- name: Run | |
run: | | |
make run | |
- name: Export Database | |
run: | | |
python -c 'from ggdp import db; db.export_database_to_parquet("data/local.duckdb", "tables");' | |
ls -lh tables | |
- uses: aquiladev/ipfs-action@master | |
id: ipfs | |
with: | |
path: ./tables | |
service: filebase | |
pinName: gitcoin-grants-data-portal-tables | |
filebaseBucket: gitcoin-grants-data-portal | |
filebaseKey: ${{ secrets.FILEBASE_KEY }} | |
filebaseSecret: ${{ secrets.FILEBASE_SECRET }} | |
- name: Create CID file | |
run: echo ${{ steps.ipfs.outputs.cid }} > data/IPFS_CID | |
- name: Commit and Push | |
run: | | |
git config --global user.name "GitHub Action" | |
git config --global user.email "actions@users.noreply.github.com" | |
git add data/IPFS_CID | |
if git diff-index --quiet HEAD --; then | |
echo "No changes to commit" | |
else | |
git commit -m "chore: :id: Update CID" | |
git push | |
fi |