Content Update #149
This file contains 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: Content Update | |
on: | |
schedule: | |
- cron: "0 23 * * *" | |
push: | |
branches: | |
- master | |
paths: | |
- "src/content/**" # Triggers only when files in /src/content change | |
workflow_dispatch: | |
jobs: | |
fetch-latest-release: | |
name: Fetch Latest Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get the latest release tag | |
id: get_latest_release | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const latestRelease = await github.rest.repos.getLatestRelease({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
}); | |
const releaseTag = latestRelease.data.tag_name; | |
core.setOutput('release_tag', releaseTag); | |
outputs: | |
ref: ${{ steps.get_latest_release.outputs.release_tag }} | |
deploy-to-static-file-host: | |
name: Deploy to Static File Host | |
needs: fetch-latest-release | |
uses: ./.github/workflows/cd-deploy.yml | |
with: | |
ref: ${{ needs.fetch-latest-release.outputs.ref }} |