-
Notifications
You must be signed in to change notification settings - Fork 358
64 lines (51 loc) · 1.87 KB
/
Copy pathtechdocs.yml
File metadata and controls
64 lines (51 loc) · 1.87 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
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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
with:
repository: backstage/backstage
fetch-depth: 1
- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: 24.x
registry-url: https://registry.npmjs.org/ # Needed for auth
- name: Setup Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: '3.14'
- 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@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093' # v3
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