Skip to content

Commit 97e7a95

Browse files
committed
UPD: techdocs config
1 parent 69f1a46 commit 97e7a95

File tree

5 files changed

+61
-2
lines changed

5 files changed

+61
-2
lines changed

.github/workflows/cd-workflow.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,6 @@ jobs:
113113
--port=7007
114114
--add-cloudsql-instances=${{ secrets.GCP_SQL_CONNECTION_NAME }}
115115
env_vars: |
116-
POSTGRES_HOST=/cloudsql/${{ secrets.GCP_SQL_CONNECTION_NAME }}
116+
POSTGRES_HOST=${{ secrets.POSTGRES_HOST }}
117117
POSTGRES_PORT=5432
118118
BASE_URL=https://backstage.foundations-software-engineering.com

.github/workflows/techdocs-gcs.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Build and Publish TechDocs to GCS
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'docs/**'
9+
- 'mkdocs.yml'
10+
11+
jobs:
12+
publish-techdocs-site:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
node-version: ['20.x']
17+
18+
env:
19+
TECHDOCS_BUCKET_NAME: ${{ secrets.TECHDOCS_BUCKET_NAME }}
20+
TECHDOCS_GCS_CREDENTIALS: ${{ secrets.TECHDOCS_GCS_CREDENTIALS }}
21+
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Enable Corepack
29+
run: corepack enable
30+
31+
- name: Set Yarn Version
32+
run: corepack prepare [email protected] --activate
33+
34+
- name: Set up Node.js
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version: ${{ matrix.node-version }}
38+
cache: 'yarn'
39+
40+
- name: Setup Python
41+
uses: actions/setup-python@v4
42+
with:
43+
python-version: '3.9'
44+
45+
- name: Install techdocs-cli
46+
run: yarn global add @techdocs/cli
47+
48+
- name: Install mkdocs and mkdocs-plugin
49+
run: python -m pip install mkdocs-techdocs-core==1.**
50+
51+
- name: Generate docs site
52+
run: techdocs-cli generate --no-docker --verbose
53+
54+
- name: Publish docs site
55+
run: techdocs-cli publish --publisher-type googleGcs --storage-name ${{ env.TECHDOCS_BUCKET_NAME }} --gcs-credentials ${{ env.TECHDOCS_GCS_CREDENTIALS }}

app-config.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,11 @@ integrations:
4444
- host: gitlab.com
4545
token: ${GITLAB_TOKEN}
4646

47+
4748
techdocs:
48-
builder: 'external'
49+
builder: 'external'
50+
generator:
51+
runIn: 'local'
4952
publisher:
5053
type: 'googleGcs'
5154
googleGcs:

docs/CHANGELOG.md

Whitespace-only changes.

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ nav:
88
- Register Your Software Component: 'how-to-register-a-component.md'
99
- Technical Documentation:
1010
- Publish Your Docs: 'how-to-publish-documentation.md'
11+
- CHANGELOG: 'CHANGELOG.md'
1112

1213
plugins:
1314
- techdocs-core

0 commit comments

Comments
 (0)