Generate Daily Devos Template #256
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: Generate Daily Devos Template | |
| on: | |
| schedule: | |
| - cron: '0 10 * * * ' # Every day at 10:00 AM UTC or approximately 3:00 AM PT (depending on daylight saving time) | |
| workflow_dispatch: # For testing purposes | |
| permissions: | |
| contents: read | |
| jobs: | |
| generate-devos-template: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v2 | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Generate Devos Template | |
| run: | | |
| npm run build | |
| npm run start | |
| - name: Get current date in PDT | |
| id: pdt_date | |
| run: echo "PDT_DATE=$(TZ=America/Los_Angeles date '+%Y-%m-%d')" >> $GITHUB_OUTPUT | |
| - name: Cache the file - to be used in deployment workflow | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ steps.pdt_date.outputs.PDT_DATE }} | |
| path: ./output.txt | |
| if-no-files-found: error | |
| retention-days: 7 | |
| overwrite: false | |
| include-hidden-files: false | |