diff --git a/.github/workflows/linkedin-new-post.yml b/.github/workflows/linkedin-new-post.yml deleted file mode 100644 index f8db780..0000000 --- a/.github/workflows/linkedin-new-post.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: Post New Blog to LinkedIn - -on: - workflow_run: - workflows: ["Scheduled Deploy"] - types: - - completed - schedule: - # 8:15 AM Eastern (15 min after Bluesky to stagger) - - cron: '15 13 * * *' - workflow_dispatch: - inputs: - target_date: - description: 'Date to look for posts (YYYY-MM-DD). Defaults to current date.' - required: false - type: string - -jobs: - check-trigger: - runs-on: ubuntu-latest - outputs: - should_continue: ${{ steps.check.outputs.should_continue }} - steps: - - name: Check if we should continue - id: check - run: | - if [ "${{ github.event_name }}" == "workflow_run" ]; then - if [ "${{ github.event.workflow_run.conclusion }}" != "success" ]; then - echo "Scheduled Deploy failed, skipping" - echo "should_continue=false" >> $GITHUB_OUTPUT - exit 0 - fi - fi - echo "should_continue=true" >> $GITHUB_OUTPUT - - detect: - needs: check-trigger - if: needs.check-trigger.outputs.should_continue == 'true' - uses: CodingWithCalvin/.github/.github/workflows/detect-blog-post-from-rss.yml@main - with: - rss_url: 'https://www.codingwithcalvin.net/rss.xml' - target_date: ${{ inputs.target_date }} - - notify: - needs: detect - if: needs.detect.outputs.has_posts == 'true' - uses: CodingWithCalvin/.github/.github/workflows/linkedin-post.yml@main - with: - post_text: | - New Blog Post! - - ${{ needs.detect.outputs.post_title }} - - ${{ needs.detect.outputs.post_hashtags }} - article_url: ${{ needs.detect.outputs.post_url }} - article_title: ${{ needs.detect.outputs.post_title }} - article_description: ${{ needs.detect.outputs.post_description }} - secrets: - LINKEDIN_ACCESS_TOKEN: ${{ secrets.LINKEDIN_ACCESS_TOKEN }} - LINKEDIN_CLIENT_ID: ${{ secrets.LINKEDIN_CLIENT_ID }} diff --git a/.github/workflows/throwback-thursday.yml b/.github/workflows/throwback-thursday.yml index 77173fe..25d69df 100644 --- a/.github/workflows/throwback-thursday.yml +++ b/.github/workflows/throwback-thursday.yml @@ -34,20 +34,3 @@ jobs: BLUESKY_USERNAME: ${{ secrets.BLUESKY_USERNAME }} BLUESKY_APP_PASSWORD: ${{ secrets.BLUESKY_APP_PASSWORD }} - post-linkedin: - needs: select - if: needs.select.outputs.has_post == 'true' - uses: CodingWithCalvin/.github/.github/workflows/linkedin-post.yml@main - with: - post_text: | - Throwback! Originally posted ${{ needs.select.outputs.post_date }} - - ${{ needs.select.outputs.post_title }} - - ${{ needs.select.outputs.post_hashtags }} #ThrowbackThursday - article_url: ${{ needs.select.outputs.post_url }} - article_title: ${{ needs.select.outputs.post_title }} - article_description: ${{ needs.select.outputs.post_description }} - secrets: - LINKEDIN_ACCESS_TOKEN: ${{ secrets.LINKEDIN_ACCESS_TOKEN }} - LINKEDIN_CLIENT_ID: ${{ secrets.LINKEDIN_CLIENT_ID }}