Skip to content

Merge pull request #40 from davidgasquez/quarto-render-on-ci #11

Merge pull request #40 from davidgasquez/quarto-render-on-ci

Merge pull request #40 from davidgasquez/quarto-render-on-ci #11

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: |
make tables
echo "Files exported:" >> $GITHUB_STEP_SUMMARY
{
echo "| Filename | File Size |"
echo "| --- | --- |"
ls -lh data/tables | tail -n +2 | awk '{printf "| %s | %s |\n", $9, $5}'
} >> $GITHUB_STEP_SUMMARY
ls -lh data/tables
- name: Install Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Render
run: |
make render
- name: Copy Portal
run: |
cp -r portal/_site data/tables/portal
- uses: filebase/ipfs-action@master
id: ipfs
with:
path: ./data/tables
service: filebase
pinName: gitcoin-grants-data-portal-tables
filebaseBucket: gitcoin-grants-data-portal
filebaseKey: ${{ secrets.FILEBASE_KEY }}
filebaseSecret: ${{ secrets.FILEBASE_SECRET }}
key: gitcoin-grants-data-portal-db
- name: Update 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