-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (46 loc) · 1.6 KB
/
bluesky-new-post.yml
File metadata and controls
52 lines (46 loc) · 1.6 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
name: Post New Blog to Bluesky
on:
push:
branches:
- main
paths:
- 'src/content/blog/**'
schedule:
# 8 AM Eastern: 13:00 UTC (EST) / 12:00 UTC (EDT)
# Using 13:00 UTC = 8 AM EST, 9 AM EDT
- cron: '0 13 * * *'
workflow_dispatch:
jobs:
detect:
uses: CodingWithCalvin/.github/.github/workflows/detect-new-blog-post.yml@main
with:
content_path: 'src/content/blog'
post_filename: 'index.md'
site_url: 'https://www.codingwithcalvin.net'
url_prefix: ''
event_name: ${{ github.event_name }}
categories_field: 'categories'
wait-for-deploy:
needs: detect
if: needs.detect.outputs.has_new_post == 'true' && github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Wait for Cloudflare deployment
run: |
echo "Waiting 5 minutes for Cloudflare to deploy..."
sleep 300
notify:
needs: [detect, wait-for-deploy]
if: always() && needs.detect.outputs.has_new_post == 'true' && needs.detect.result == 'success'
uses: CodingWithCalvin/.github/.github/workflows/bluesky-post.yml@main
with:
post_text: |
📝 New Blog Post!
[${{ needs.detect.outputs.post_title }}](${{ needs.detect.outputs.post_url }})
${{ needs.detect.outputs.post_hashtags }}
embed_url: ${{ needs.detect.outputs.post_url }}
embed_title: ${{ needs.detect.outputs.post_title }}
embed_description: ${{ needs.detect.outputs.post_description }}
secrets:
BLUESKY_USERNAME: ${{ secrets.BLUESKY_USERNAME }}
BLUESKY_APP_PASSWORD: ${{ secrets.BLUESKY_APP_PASSWORD }}