-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (34 loc) · 1.01 KB
/
cd-content-update.yml
File metadata and controls
37 lines (34 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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@v9
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: refs/tags/${{ 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 }}