-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.14 KB
/
update-api-constants.yaml
File metadata and controls
50 lines (41 loc) · 1.14 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
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Update API constants
on:
push:
branches:
- main
paths:
- .github/workflows/update-api-constants.yaml
- configuration/constants.json
concurrency: commits-pages
env:
publish-branch: gh-pages
jobs:
update-api-constants:
runs-on: ubuntu-latest
name: Update constants
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v6
with:
ssh-key: ${{ secrets.POWERCASTDEPLOY }}
ref: ${{ env.publish-branch }}
path: github-pages
- shell: bash
name: Clean up previous constants
run: |
cd configuration/constants
constants=$(echo *)
cd -
cd ./github-pages/api/
rm -rf $constants || true
- shell: bash
name: Add constants
run: cp -rv configuration/constants/* ./github-pages/api/
- uses: EndBug/add-and-commit@v10
name: Publish constants
with:
cwd: github-pages
add: "['api/']"
push: --set-upstream origin ${{ env.publish-branch }}
default_author: github_actions
message: Publish constants via workflow