Skip to content

Commit

Permalink
Refactored to use google-github-actions/auth@v2
Browse files Browse the repository at this point in the history
Signed-off-by: Andre Wanlin <[email protected]>
  • Loading branch information
awanlin committed Dec 2, 2023
1 parent 6fbf09a commit a6060c7
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/techdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,24 @@ concurrency:
jobs:
publish-techdocs-site:
runs-on: ubuntu-latest

permissions:
contents: 'read'
id-token: 'write'
steps:
- name: Checkout Backstage
uses: actions/checkout@v3
with:
repository: backstage/backstage
fetch-depth: 1

- name: use node.js 18.x
- name: Use Node 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

- name: Use Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'

Expand All @@ -40,7 +44,9 @@ jobs:
- name: Generate docs site
run: techdocs-cli generate --no-docker --verbose

- name: Login to GCS
uses: 'google-github-actions/auth@v2'
with:
credentials_json: ${{ secrets.TECHDOCS_GCS_CREDENTIALS_JSON }}
- name: Publish docs site
run: techdocs-cli publish --publisher-type googleGcs --storage-name ${{ secrets.TECHDOCS_GCS_BUCKET }} --entity default/component/backstage
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}

0 comments on commit a6060c7

Please sign in to comment.