Skip to content

Update Dashboard

Update Dashboard #1119

name: Update Dashboard
on:
workflow_dispatch:
schedule:
- cron: '0 */4 * * *'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# ducklake storage credentials (also use for cloudflare):
DUCKLAKE_STORAGE_S3_KEY_ID: ${{ secrets.DUCKLAKE_STORAGE_S3_KEY_ID }}
DUCKLAKE_STORAGE_S3_SECRET: ${{ secrets.DUCKLAKE_STORAGE_S3_SECRET }}
DUCKLAKE_STORAGE_S3_ENDPOINT: ${{ secrets.DUCKLAKE_STORAGE_S3_ENDPOINT }}
DUCKLAKE_STORAGE_R2_ACCOUNT_ID: ${{ secrets.DUCKLAKE_STORAGE_R2_ACCOUNT_ID }}
# ducklake catalog credentials:
DUCKLAKE_CATALOG_PG_HOST: ${{ secrets.DUCKLAKE_CATALOG_PG_HOST }}
DUCKLAKE_CATALOG_PG_USER: ${{ secrets.DUCKLAKE_CATALOG_PG_USER }}
DUCKLAKE_CATALOG_PG_PASSWORD: ${{ secrets.DUCKLAKE_CATALOG_PG_PASSWORD }}
# aws s3 credentials
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
jobs:
update-ducklake:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update DuckLake
run: |
python3 -m pip install -r requirements.txt
make secrets
make run_feeds
build:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: update-ducklake
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: evidence/package-lock.json
- name: Install dependencies
working-directory: ./evidence
run: npm install
- name: build
env:
BASE_PATH: '/${{ github.event.repository.name }}'
run: |
python3 -m pip install -r requirements.txt
make secrets
make generate_sources
make build
- name: Upload Artifacts
uses: actions/upload-pages-artifact@v3
with:
path: 'evidence/build'
deploy:
if: github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v4