Skip to content

Commit e49ecb8

Browse files
committed
feat: add website card embed and wait for deploy
- Pass embed_url for website card in Bluesky posts - Remove /blog prefix from post URLs - Add 5-minute wait for Cloudflare deploy on push events
1 parent 1b066c1 commit e49ecb8

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/bluesky-new-post.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,23 @@ jobs:
1919
content_path: 'src/content/blog'
2020
post_filename: 'index.md'
2121
site_url: 'https://www.codingwithcalvin.net'
22-
url_prefix: '/blog'
22+
url_prefix: ''
2323
event_name: ${{ github.event_name }}
2424
categories_field: 'categories'
2525

26-
notify:
26+
wait-for-deploy:
2727
needs: detect
28-
if: needs.detect.outputs.has_new_post == 'true'
28+
if: needs.detect.outputs.has_new_post == 'true' && github.event_name == 'push'
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Wait for Cloudflare deployment
32+
run: |
33+
echo "Waiting 5 minutes for Cloudflare to deploy..."
34+
sleep 300
35+
36+
notify:
37+
needs: [detect, wait-for-deploy]
38+
if: always() && needs.detect.outputs.has_new_post == 'true' && needs.detect.result == 'success'
2939
uses: CodingWithCalvin/.github/.github/workflows/bluesky-post.yml@main
3040
with:
3141
post_text: |
@@ -34,6 +44,7 @@ jobs:
3444
[${{ needs.detect.outputs.post_title }}](${{ needs.detect.outputs.post_url }})
3545
3646
${{ needs.detect.outputs.post_hashtags }}
47+
embed_url: ${{ needs.detect.outputs.post_url }}
3748
secrets:
3849
BLUESKY_USERNAME: ${{ secrets.BLUESKY_USERNAME }}
3950
BLUESKY_APP_PASSWORD: ${{ secrets.BLUESKY_APP_PASSWORD }}

0 commit comments

Comments
 (0)