Publish scheduled blog posts #494
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish scheduled blog posts | |
on: | |
schedule: | |
- cron: '0 23 * * *' | |
workflow_dispatch: | |
jobs: | |
publish-scheduled-blog-posts: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Check if content directory was modified | |
id: check_content | |
run: | | |
if git diff --name-only "@{1 day ago}" -- content | |
then | |
echo "modified=true" >> $GITHUB_OUTPUT | |
else | |
echo "modified=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Trigger website deploy | |
run: | | |
chmod +x ./scripts/manage-scheduled-blogs.sh | |
./scripts/manage-scheduled-blogs.sh |