Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

ci: refresh sponsors daily and deploy the site after updates

Andrej9d88948d6a4c
diff --git a/.github/workflows/update-contributors.yml b/.github/workflows/update-contributors.yml
index 3d22d4d77..8050e795e 100644
--- a/.github/workflows/update-contributors.yml
+++ b/.github/workflows/update-contributors.yml
@@ -3,7 +3,7 @@ name: Update Contributors
on:
workflow_dispatch:
schedule:
- - cron: '0 0 * * 0'
+ - cron: '0 2 * * *'
push:
branches:
- main
@@ -16,6 +16,7 @@ jobs:
permissions:
contents: write
pull-requests: write
+ actions: write
steps:
- name: Checkout repository
@@ -45,9 +46,20 @@ jobs:
run: node apps/site/scripts/sync-sponsors.mjs
- name: Commit and Push Changes
+ id: commit
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add CONTRIBUTORS.svg README.md apps/site/constants/sponsors.json
- git commit -m "docs: update contributors and sponsors" || exit 0
- git push
\ No newline at end of file
+ if git commit -m "docs: update contributors and sponsors"; then
+ git push
+ echo "pushed=true" >> "$GITHUB_OUTPUT"
+ else
+ echo "pushed=false" >> "$GITHUB_OUTPUT"
+ fi
+
+ - name: Deploy Site
+ if: ${{ steps.commit.outputs.pushed == 'true' }}
+ env:
+ GH_TOKEN: ${{ github.token }}
+ run: gh workflow run deploy-site.yml --repo "${GITHUB_REPOSITORY}" --ref main
\ No newline at end of file