UPD: Update how-to-register-a-component.md (#95) #2
This file contains hidden or 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
| name: Build and Publish TechDocs to GCS | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'docs/**' | |
| - 'mkdocs.yml' | |
| jobs: | |
| publish-techdocs-site: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: ['20.x'] | |
| env: | |
| TECHDOCS_BUCKET_NAME: backstage-codeidp-techdocs | |
| TECHDOCS_GCS_CREDENTIALS: ${{ secrets.TECHDOCS_GCS_CREDENTIALS }} | |
| TECHDOCS_REGION: europe-west10 | |
| ENTITY_NAMESPACE: 'default' | |
| ENTITY_KIND: 'Component' | |
| ENTITY_NAME: 'code-idp-docs' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v3 | |
| - 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-plugin | |
| run: python3 -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 $TECHDOCS_BUCKET_NAME --entity $ENTITY_NAMESPACE/$ENTITY_KIND/$ENTITY_NAME |