-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (43 loc) · 2.17 KB
/
generate-cards.yml
File metadata and controls
54 lines (43 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Generate Profile Card SVGs
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
generate-cards:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
token: ${{ secrets.PAT_TOKEN }}
fetch-depth: 0
- name: Create assets directory
run: mkdir -p assets
- name: Generate SVG cards for all themes
run: |
DEPLOYMENT_URL="https://github-profile-card-blue.vercel.app"
USERNAME="nayandas69"
THEMES=("default" "dark" "dracula" "monokai" "nord" "github_dark" "slate" "midnight" "highcontrast" "pearl" "ice" "sand" "pastel_peach" "pastel_mint" "pastel_lavender" "pastel_lemon" "pastel_rose" "mui_blue" "mui_indigo" "mui_teal" "mui_deep_purple" "mui_orange" "mui_red" "vscode_dark_plus" "vscode_light" "vscode_monokai_pro" "vscode_night_owl" "vscode_palenight" "twitter" "discord" "spotify" "github_light" "youtube" "instagram" "radical" "cyberpunk" "synthwave" "oceanic" "mint" "royal" "gruvbox" "merko" "forest" "rose" "sunset" "lavender" "ember" "tokyonight" "onedark" "cobalt" "amoled_blue" "amoled_green" "amoled_purple" "grayscale_light" "grayscale_mid" "grayscale_dark")
for theme in "${THEMES[@]}"; do
echo "Generating card for theme: $theme"
curl -s "${DEPLOYMENT_URL}/card/${USERNAME}?theme=${theme}" > "assets/profile-card-${theme}.svg"
echo "Saved: assets/profile-card-${theme}.svg"
done
- name: Configure Git
run: |
git config user.name "nayandas69"
git config user.email "174907517+nayandas69@users.noreply.github.com"
- name: Commit and Push Changes
run: |
if [[ -n $(git status --porcelain) ]]; then
git add assets/
git commit -m "🎨 Update profile card SVGs - $(date +'%Y-%m-%d %H:%M UTC')" || exit 0
git pull --rebase origin main || true
git push origin main
echo "✅ Successfully committed as nayandas69"
else
echo "ℹ️ No changes to commit"
fi