snapshot #59
This file contains hidden or 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: snapshot | |
| on: | |
| schedule: | |
| - cron: "0 6 * * *" | |
| workflow_dispatch: {} | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| snapshot: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4.2.2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5.3.0 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| cache-dependency-path: scripts/pyproject.toml | |
| - name: Install | |
| working-directory: scripts | |
| run: pip install -e . | |
| - name: Snapshot | |
| env: | |
| SNOWFLAKE_ACCOUNT: ${{ secrets.SNOWFLAKE_ACCOUNT }} | |
| SNOWFLAKE_USER: ${{ secrets.SNOWFLAKE_USER }} | |
| SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }} | |
| SNOWFLAKE_ROLE: ${{ secrets.SNOWFLAKE_ROLE }} | |
| SNOWFLAKE_WAREHOUSE: ${{ secrets.SNOWFLAKE_WAREHOUSE }} | |
| run: | | |
| mkdir -p out | |
| uberblick snapshot --output out/snapshot.duckdb --no-save-history | |
| uberblick report --snapshot out/snapshot.duckdb --output out/index.html | |
| - name: Upload snapshot as artifact (NOT to git) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: snapshot-${{ github.run_id }} | |
| path: out/snapshot.duckdb | |
| retention-days: 7 | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: out | |
| name: github-pages | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |