Files
ipfs-blog/.github/workflows/scheduled-publishing.yml
dependabot[bot] 9ab33ca6d3 Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 12:59:45 +00:00

24 lines
1017 B
YAML

name: Check for scheduled posts to publish
on:
schedule:
- cron: '0 4,16 * * *'
jobs:
check-n-publish:
name: Check for scheduled posts and publish if any found
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install dependencies
run: npm ci
- name: Check for scheduled posts
run: echo "should_publish=$(${{ github.workspace }}/scripts/scheduled-publishing.js)" >> $GITHUB_OUTPUT
id: should_publish_step
- name: Trigger Fleek Build
if: ${{ steps.should_publish_step.outputs.should_publish == 'true' }}
run: curl -H "Authorization:${{ secrets.FLEEK_API_KEY }}" -H "Content-Type:application/json" -d '{"query":"mutation { triggerDeploy(siteId:\"${{ secrets.FLEEK_SITE_ID }}\") { status } }"}' https://api.fleek.co/graphql
- name: Scheduled posts published
if: ${{ steps.should_publish_step.outputs.should_publish == 'true' }}
run: echo "Check https://blog.ipfs.tech"