-
Notifications
You must be signed in to change notification settings - Fork 14
58 lines (48 loc) · 1.6 KB
/
generate-documentation.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
56
57
58
name: Generate documentation
on:
workflow_call:
secrets:
GH_TOKEN:
description: GitHub token to access player-ci repo for CI scripts
required: true
GCS_ACCOUNT:
description: Google Cloud Storage account for uploading API docs
required: true
CF_TOKEN:
description: CloudFlare token for API docs cache purging
required: true
CF_ZONEID:
description: CloudFlare zone ID for API docs cache purging
required: true
workflow_dispatch:
env:
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
jobs:
generate-documentation:
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GC_SACCOUNT: ${{ secrets.GCS_ACCOUNT }}
CF_TOKEN: ${{ secrets.CF_TOKEN }}
CF_ZONEID: ${{ secrets.CF_ZONEID }}
name: Generate documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Environment
uses: ./.github/actions/setup-environment
with:
node: true
subprojects: true
- name: Detect version using jq
run: |
echo "PCI_BRANCH=$(jq -r '.version' package.json)" >> $GITHUB_ENV
- name: Generate documentation
run: yarn docs
- name: Install CI scripts
run: |
curl -sS -H "Authorization: token ${GH_TOKEN}" -L https://raw.githubusercontent.com/bitmovin-engineering/player-ci/master/install.sh | bash
- name: Upload to CDN
run: node ./ci_scripts/src/uploadToGcs.js reactnative ../../docs/generated
- name: Purge CDN cache
run: node ./ci_scripts/src/purgeCloudflarePath.js 'reactnative'