-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (46 loc) · 1.54 KB
/
glossary.yml
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
51
52
53
54
55
name: update glossary
# Controls when the workflow will run
on:
gollum:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
glossaryDefFile:
required: true
default: glossary.json
description: glossaryDefFile
deployBranch:
required: false
default: main
description: This is where the output of script will be pushed to.
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2.2.2
- name: Install deps
run: |
git clone https://github.com/trustoverip/tt.git
python -m pip install marko
python -m pip install requests
- name: Set variables
env:
DEFAULT_GLOSSARY_DEF_FILE: glossary.json
DEFAULT_DEPLOY_BRANCH: main
run: |
echo "GLOSSARY_DEF_FILE=${{ github.event.inputs.glossaryDefFile || env.DEFAULT_GLOSSARY_DEF_FILE }}" >> $GITHUB_ENV
echo "DEPLOY_BRANCH=${{ github.event.inputs.deployBranch || env.DEFAULT_DEPLOY_BRANCH }}" >> $GITHUB_ENV
- name: Run script
run: |
./tt/bin/tt glossary ${{ env.GLOSSARY_DEF_FILE }} >docs/glossary.html
- name: Setup git config
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Commit
run: |
git add docs/glossary.html
git commit -m "auto-update glossary"
git push origin main:${{ env.DEPLOY_BRANCH }}