-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #156 from awanlin/topic/add-techdocs-action
Workflow to publish Backstage TechDocs
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
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 | ||
|
||
steps: | ||
- name: Checkout Backstage | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: backstage/backstage | ||
fetch-depth: 1 | ||
|
||
- name: use node.js 18.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
registry-url: https://registry.npmjs.org/ # Needed for auth | ||
- uses: actions/setup-python@v4 | ||
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: Generate docs site | ||
run: techdocs-cli generate --no-docker --verbose | ||
|
||
- name: Publish docs site | ||
run: techdocs-cli publish --publisher-type googleGcs --storage-name ${{ secrets.TECHDOCS_GCS_BUCKET }} --entity default/component/backstage |