-
Notifications
You must be signed in to change notification settings - Fork 232
64 lines (51 loc) · 1.71 KB
/
techdocs.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
59
60
61
62
63
64
name: 'Publish Backstage TechDocs'
on:
workflow_dispatch:
# Run Daily at 10:00 UTC time
schedule:
- cron: '0 10 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
publish-techdocs-site:
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
steps:
- name: Checkout Backstage
uses: actions/checkout@v4
with:
repository: backstage/backstage
fetch-depth: 1
- name: Setup Node 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: https://registry.npmjs.org/ # Needed for auth
- name: Setup Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install techdocs-cli
run: sudo npm install -g @techdocs/cli
- name: Install MkDocs and MkDocs Plugins
run: python -m pip install mkdocs-techdocs-core==1.*
- name: Clean Up Readmes
run: |
for i in README*.md; do
sed -i 's|docs/assets|assets|g' $i
sed -i 's|README.md|index.md|g' $i
done
- name: Copy Translated Readmes
run: |
mv README-*.md docs
- name: Generate TechDocs
run: techdocs-cli generate --no-docker --legacyCopyReadmeMdToIndexMd --verbose
- name: Login to Google Cloud Services
uses: 'google-github-actions/auth@v2'
with:
credentials_json: ${{ secrets.TECHDOCS_GCS_CREDENTIALS_JSON }}
- name: Publish TechDocs
run: techdocs-cli publish --publisher-type googleGcs --storage-name ${{ secrets.TECHDOCS_GCS_BUCKET }} --entity default/component/backstage