Update Dashboard #6
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: Update Dashboard | |
on: | |
schedule: | |
- cron: '0 0 * * 0' # Every Sunday at 00:00 UTC | |
workflow_dispatch: | |
jobs: | |
update-dashboard: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- name: Install dependencies | |
run: bun install | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 9 | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- name: Clone blast repository | |
run: | | |
git clone https://github.com/BlastLauncher/blast.git blast_clone | |
- name: Install blast dependencies | |
run: | | |
cd blast_clone | |
pnpm install --frozen-lockfile | |
pnpm run build | |
- name: Generate dashboard markdown | |
run: | | |
bun run index.ts -w --repo $(pwd)/blast_clone/packages/blast-api | |
- name: Preserve dashboard.md | |
run: | | |
mv dashboard.md ../dashboard.md.tmp | |
- name: Checkout dashboard branch | |
run: | | |
git fetch origin dashboard || true | |
if git show-ref --verify --quiet refs/heads/dashboard; then | |
git checkout dashboard | |
else | |
git checkout --orphan dashboard | |
fi | |
mv ../dashboard.md.tmp dashboard.md | |
- name: Commit and push dashboard.md | |
run: | | |
git config user.email "actions@github.com" | |
git config user.name "GitHub Actions" | |
git add dashboard.md | |
git commit -m "Update dashboard.md [skip ci]" || echo "No changes to commit" | |
git push --set-upstream origin dashboard |