Generate Dashboard #58
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: Generate Dashboard | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 5 * * *" # Runs every night at midnight | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: prefix-dev/[email protected] | |
with: | |
pixi-version: v0.29.0 | |
cache: true | |
- run: pixi run render | |
- name: Commit and push changes | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
mv render/* . | |
mv rendered.html index.html | |
git checkout -b deploy-temp | |
git add index.html custom.css ess.png favicon.ico | |
git commit -m "Deployed on $(date -u '+%Y-%m-%d %H:%M:%S')" | |
git push -f origin deploy-temp:deploy | |
git checkout main | |
git branch -D deploy-temp | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |