From 43f06455e9a27b41bdb64f13ab32314b1d7ed642 Mon Sep 17 00:00:00 2001 From: Monta Bot <112391068+montabot@users.noreply.github.com> Date: Fri, 1 Mar 2024 10:41:23 +0100 Subject: [PATCH] Add backstage file --- .github/workflows/backstage_techdocs.yaml | 44 +++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/backstage_techdocs.yaml diff --git a/.github/workflows/backstage_techdocs.yaml b/.github/workflows/backstage_techdocs.yaml new file mode 100644 index 00000000..c9cca3b4 --- /dev/null +++ b/.github/workflows/backstage_techdocs.yaml @@ -0,0 +1,44 @@ +name: Publish TechDocs Site + +on: + push: + branches: [main] + paths: + - "docs/**" + - "mkdocs.yml" + workflow_dispatch: + + +jobs: + publish-techdocs-site: + runs-on: ubuntu-latest + + env: + TECHDOCS_S3_BUCKET_NAME: 'monta-tech-docs' + AWS_ACCESS_KEY_ID: ${{ secrets.TECHDOCS_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.TECHDOCS_AWS_SECRET_ACCESS_KEY }} + AWS_REGION: 'eu-west-1' + ENTITY_NAMESPACE: 'default' + ENTITY_KIND: 'Component' + ENTITY_NAME: 'backstage' + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - 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 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 awsS3 --storage-name $TECHDOCS_S3_BUCKET_NAME --entity $ENTITY_NAMESPACE/$ENTITY_KIND/$ENTITY_NAME \ No newline at end of file