@@ -78,50 +78,50 @@ jobs:
7878 body: dashboard
7979 });
8080
81- # notify_discord:
82- # needs: update_progress
83- # runs-on: ubuntu-latest
84- # steps:
85- # - name: Checkout Repository
86- # uses: actions/checkout@v3
87- # with:
88- # fetch-depth: 0
89- # ref: main
81+ notify_discord :
82+ needs : update_progress
83+ runs-on : ubuntu-latest
84+ steps :
85+ - name : Checkout Repository
86+ uses : actions/checkout@v3
87+ with :
88+ fetch-depth : 0
89+ ref : main
9090
91- # - name: Send Dashboard to Discord
92- # working-directory: _MonthlyChallenges
93- # run: |
94- # # DASHBOARD.md ํ์ผ์ ์์ ํ๊ฒ JSON ๋ฌธ์์ด๋ก ์ด์ค์ผ์ดํ
95- # DASHBOARD_CONTENT=$(jq -R -s '.' DASHBOARD.md)
96- # echo "Dashboard content: $DASHBOARD_CONTENT"
91+ - name : Send Dashboard to Discord
92+ working-directory : _MonthlyChallenges
93+ run : |
94+ # DASHBOARD.md ํ์ผ์ ์์ ํ๊ฒ JSON ๋ฌธ์์ด๋ก ์ด์ค์ผ์ดํ
95+ DASHBOARD_CONTENT=$(jq -R -s '.' DASHBOARD.md)
96+ echo "Dashboard content: $DASHBOARD_CONTENT"
9797
98- # # Discord ์๋ฒ ๋ ๋ฉ์์ง JSON ์์ฑ
99- # EMBED_JSON=$(cat <<EOF
100- # {
101- # "content": "",
102- # "embeds": [
103- # {
104- # "author": {
105- # "name": "Allumbus๐ฅ",
106- # "url": "https://github.com/AlgorithmStudy-Allumbus",
107- # "icon_url": "https://imgur.com/kKJg6v3.jpg"
108- # },
109- # "title": "**๐ ์ฑ๋ฆฐ์ง ์งํ ์ํฉ**",
110- # "url": "https://github.com/AlgorithmStudy-Allumbus/codingtest_algorithm_study/blob/main/_MonthlyChallenges/DASHBOARD.md",
111- # "description": ${DASHBOARD_CONTENT},
112- # "color": 15258703,
113- # "footer": {
114- # "text": "Updated on $(date '+%Y-%m-%d %H:%M:%S')"
115- # }
116- # }
117- # ]
118- # }
119- # EOF
120- # )
121- # echo "Embed JSON: $EMBED_JSON"
98+ # Discord ์๋ฒ ๋ ๋ฉ์์ง JSON ์์ฑ
99+ EMBED_JSON=$(cat <<EOF
100+ {
101+ "content": "",
102+ "embeds": [
103+ {
104+ "author": {
105+ "name": "Allumbus๐ฅ",
106+ "url": "https://github.com/AlgorithmStudy-Allumbus",
107+ "icon_url": "https://imgur.com/kKJg6v3.jpg"
108+ },
109+ "title": "**๐ ์ฑ๋ฆฐ์ง ์งํ ์ํฉ**",
110+ "url": "https://github.com/AlgorithmStudy-Allumbus/codingtest_algorithm_study/blob/main/_MonthlyChallenges/DASHBOARD.md",
111+ "description": ${DASHBOARD_CONTENT},
112+ "color": 15258703,
113+ "footer": {
114+ "text": "Updated on $(date '+%Y-%m-%d %H:%M:%S')"
115+ }
116+ }
117+ ]
118+ }
119+ EOF
120+ )
121+ echo "Embed JSON: $EMBED_JSON"
122122
123- # # Discord ์นํ
ํธ์ถ (๋๋ฒ๊ทธ๋ฅผ ์ํด -v ์ต์
์ฌ์ฉ)
124- # curl -v -H "Content-Type: application/json" \
125- # -X POST \
126- # -d "$EMBED_JSON" \
127- # "${{ secrets.DISCORD_WEBHOOK_URL }}"
123+ # Discord ์นํ
ํธ์ถ (๋๋ฒ๊ทธ๋ฅผ ์ํด -v ์ต์
์ฌ์ฉ)
124+ curl -v -H "Content-Type: application/json" \
125+ -X POST \
126+ -d "$EMBED_JSON" \
127+ "${{ secrets.DISCORD_WEBHOOK_URL }}"
0 commit comments