Skip to content

Merge pull request #34 from davidgasquez/revert-33-update-ipns #6

Merge pull request #34 from davidgasquez/revert-33-update-ipns

Merge pull request #34 from davidgasquez/revert-33-update-ipns #6

Workflow file for this run

name: Build and Deploy
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 and Log File Sizes
run: |
python -c 'from ggdp import db; db.export_database_to_parquet("data/local.duckdb", "tables");'
echo "Files exported:" >> $GITHUB_STEP_SUMMARY
{
echo "| Filename | File Size |"
echo "| --- | --- |"
ls -lh tables | tail -n +2 | awk '{printf "| %s | %s |\n", $9, $5}'
} >> $GITHUB_STEP_SUMMARY
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