From 2699119cbc182d5f7501aa634cb247c322876afc Mon Sep 17 00:00:00 2001 From: Adri Shahri Bin Santosoh Date: Tue, 16 Jul 2024 18:07:04 +0800 Subject: [PATCH 1/2] fix(update): title app duplication --- architectures/github/aws-fullstack-app/template.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/architectures/github/aws-fullstack-app/template.yaml b/architectures/github/aws-fullstack-app/template.yaml index f2529e4..8685957 100644 --- a/architectures/github/aws-fullstack-app/template.yaml +++ b/architectures/github/aws-fullstack-app/template.yaml @@ -33,8 +33,6 @@ spec: - name - repoUrl - description - - coreAppName - - remoteAppName properties: name: title: Name From a4d67271c8d7dcf5d1de621ee98c824ba6a9be6c Mon Sep 17 00:00:00 2001 From: Adri Shahri Bin Santosoh Date: Tue, 16 Jul 2024 18:09:48 +0800 Subject: [PATCH 2/2] feat(add): initial PR template & techdocs workflows --- .github/PULL_REQUEST_TEMPLATE.md | 27 ++++++++++++++ .github/workflows/techdocs.yaml | 63 ++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/workflows/techdocs.yaml diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..b3ac575 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,27 @@ +## Pull Request Checklist + +Please ensure you have completed the following checks before submitting your pull request: + +### Description + +Briefly explain the purpose of your pull request. + +### Content Checks + +- [ ] Have you included a `catalog-info.yaml` file for your content? + - [ ] Is the `catalog-info.yaml` file complete and accurate? + +### Template Checks + +- [ ] Have you included a `template.yaml` file for your scaffolder template? + - [ ] Is the `template.yaml` file complete and accurate? + +### Documentations + +- [ ] Have you updated the relevant documentation? If so, have you follow the folder structures for both TechDocs and ADRs? + - [ ] Are there TechDocs (`docs/ techdocs/`) for the new/updated component? + - [ ] Have you added Architectural Decision Records (ADRs) if applicable in `docs/decisions/`? + +### Additional Notes + +Please add any additional notes or comments here that you think are relevant to your pull request. \ No newline at end of file diff --git a/.github/workflows/techdocs.yaml b/.github/workflows/techdocs.yaml new file mode 100644 index 0000000..70ef048 --- /dev/null +++ b/.github/workflows/techdocs.yaml @@ -0,0 +1,63 @@ +name: Publish Product Central TechDocs + +on: + push: + branches: + - main + paths: + - "architectures/docs/techdocs/**" + # Run Daily at 10:00 UTC time + schedule: + - cron: "0 10 * * *" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + publish-product-central-techdocs: + name: Publish Product Central TechDocs + runs-on: ubuntu-latest + + env: + TECHDOCS_S3_BUCKET_NAME: ${{ secrets.AWS_BUCKET_NAME }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: ${{ secrets.AWS_REGION }} + ENTITY_NAMESPACE: "default" + ENTITY_KIND: "Component" + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Node + uses: actions/setup-node@v4 + + - name: Setup local Turbo cache + uses: dtinth/setup-github-actions-caching-for-turbo@v1 + + - name: Setup Python + uses: actions/setup-python@v5 + 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 and Publish docs site + run: | + for dir in docs/techdocs/*/ ; do + ENTITY_NAME=$(basename "$dir") + echo "Generating docs for $ENTITY_NAME" + cd "$dir" + techdocs-cli generate --no-docker --output-dir "site" --verbose + cd - # Return to the previous directory + echo "Publishing docs for $ENTITY_NAME" + techdocs-cli publish --publisher-type awsS3 --storage-name $TECHDOCS_S3_BUCKET_NAME --entity $ENTITY_NAMESPACE/$ENTITY_KIND/$ENTITY_NAME --directory "$dir/site" + done