From 85658f427e6d8af8e8ce2f2564b0813fb8dcc47f Mon Sep 17 00:00:00 2001 From: sindhute Date: Tue, 22 Jun 2021 15:38:36 -0400 Subject: [PATCH 01/21] get changelog --- .../cloud-formation-stack-status.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/cloud-formation-stack-status.yaml b/.github/workflows/cloud-formation-stack-status.yaml index f4db8a47..8a536be9 100644 --- a/.github/workflows/cloud-formation-stack-status.yaml +++ b/.github/workflows/cloud-formation-stack-status.yaml @@ -234,3 +234,22 @@ jobs: -H "Content-Type: application/json" \ -H "Authorization: token $GITHUB_TOKEN" \ --data '{ "body": "The site has been deployed to https://'`cat published_domain_name.txt`'" }' + + job_4: + name: Generate the Changelog and post it to Slack + runs-on: ubuntu-latest + needs: [job_1] + steps: + - uses: actions/checkout@v2 + - name: Generate changelog + id: changelog + uses: metcalfc/changelog-generator@v1.0.0 + with: + myToken: ${{ secrets.GITHUB_TOKEN }} + + - name: Get the changelog + run: echo "${{ steps.changelog.outputs.changelog }}" + + + + From 0f655aeaa07681e296b411403cb93e93df58282d Mon Sep 17 00:00:00 2001 From: sindhute Date: Tue, 22 Jun 2021 15:46:19 -0400 Subject: [PATCH 02/21] add PAT --- .github/workflows/cloud-formation-stack-status.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cloud-formation-stack-status.yaml b/.github/workflows/cloud-formation-stack-status.yaml index 8a536be9..6e84a014 100644 --- a/.github/workflows/cloud-formation-stack-status.yaml +++ b/.github/workflows/cloud-formation-stack-status.yaml @@ -245,7 +245,7 @@ jobs: id: changelog uses: metcalfc/changelog-generator@v1.0.0 with: - myToken: ${{ secrets.GITHUB_TOKEN }} + myToken: ${{ secrets.PAT }} - name: Get the changelog run: echo "${{ steps.changelog.outputs.changelog }}" From e039f7be43b5d2e22f7a035fec8b62f8a625c902 Mon Sep 17 00:00:00 2001 From: sindhute Date: Tue, 22 Jun 2021 15:53:26 -0400 Subject: [PATCH 03/21] use githubToken --- .github/workflows/cloud-formation-stack-status.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cloud-formation-stack-status.yaml b/.github/workflows/cloud-formation-stack-status.yaml index 6e84a014..0dab4a4b 100644 --- a/.github/workflows/cloud-formation-stack-status.yaml +++ b/.github/workflows/cloud-formation-stack-status.yaml @@ -239,13 +239,15 @@ jobs: name: Generate the Changelog and post it to Slack runs-on: ubuntu-latest needs: [job_1] + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v2 - name: Generate changelog - id: changelog - uses: metcalfc/changelog-generator@v1.0.0 + id: release + uses: metcalfc/changelog-generator@main with: - myToken: ${{ secrets.PAT }} + myToken: $GITHUB_TOKEN - name: Get the changelog run: echo "${{ steps.changelog.outputs.changelog }}" From 97f250bfdaa095131a8a69ca4c17df55c5c3f68d Mon Sep 17 00:00:00 2001 From: sindhute Date: Tue, 22 Jun 2021 15:56:11 -0400 Subject: [PATCH 04/21] Update cloud-formation-stack-status.yaml --- .github/workflows/cloud-formation-stack-status.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/cloud-formation-stack-status.yaml b/.github/workflows/cloud-formation-stack-status.yaml index 0dab4a4b..ff14f142 100644 --- a/.github/workflows/cloud-formation-stack-status.yaml +++ b/.github/workflows/cloud-formation-stack-status.yaml @@ -238,7 +238,6 @@ jobs: job_4: name: Generate the Changelog and post it to Slack runs-on: ubuntu-latest - needs: [job_1] env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: From 6a74e5bb268462da9482720f215798dfe5bac5dd Mon Sep 17 00:00:00 2001 From: sindhute Date: Tue, 22 Jun 2021 16:01:28 -0400 Subject: [PATCH 05/21] Update cloud-formation-stack-status.yaml --- .github/workflows/cloud-formation-stack-status.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cloud-formation-stack-status.yaml b/.github/workflows/cloud-formation-stack-status.yaml index ff14f142..becf2f8a 100644 --- a/.github/workflows/cloud-formation-stack-status.yaml +++ b/.github/workflows/cloud-formation-stack-status.yaml @@ -239,7 +239,7 @@ jobs: name: Generate the Changelog and post it to Slack runs-on: ubuntu-latest env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.PAT }} steps: - uses: actions/checkout@v2 - name: Generate changelog From 6361bfb098b358f319b5fa84f075dcf7b91d9fbf Mon Sep 17 00:00:00 2001 From: sindhute Date: Tue, 22 Jun 2021 16:03:35 -0400 Subject: [PATCH 06/21] Update cloud-formation-stack-status.yaml --- .github/workflows/cloud-formation-stack-status.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/cloud-formation-stack-status.yaml b/.github/workflows/cloud-formation-stack-status.yaml index becf2f8a..99851b2e 100644 --- a/.github/workflows/cloud-formation-stack-status.yaml +++ b/.github/workflows/cloud-formation-stack-status.yaml @@ -238,15 +238,13 @@ jobs: job_4: name: Generate the Changelog and post it to Slack runs-on: ubuntu-latest - env: - GITHUB_TOKEN: ${{ secrets.PAT }} steps: - uses: actions/checkout@v2 - name: Generate changelog id: release uses: metcalfc/changelog-generator@main with: - myToken: $GITHUB_TOKEN + myToken: ${{ secrets.PAT }} - name: Get the changelog run: echo "${{ steps.changelog.outputs.changelog }}" From f74ecbbcd1a3b8526b97345475246b0c23fd2bc5 Mon Sep 17 00:00:00 2001 From: sindhute Date: Tue, 22 Jun 2021 16:08:48 -0400 Subject: [PATCH 07/21] Update cloud-formation-stack-status.yaml --- .github/workflows/cloud-formation-stack-status.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cloud-formation-stack-status.yaml b/.github/workflows/cloud-formation-stack-status.yaml index 99851b2e..26b63e0e 100644 --- a/.github/workflows/cloud-formation-stack-status.yaml +++ b/.github/workflows/cloud-formation-stack-status.yaml @@ -242,9 +242,9 @@ jobs: - uses: actions/checkout@v2 - name: Generate changelog id: release - uses: metcalfc/changelog-generator@main + uses: metcalfc/changelog-generator@v1.0.0 with: - myToken: ${{ secrets.PAT }} + myToken: ${{ secrets.GITHUB_TOKEN }} - name: Get the changelog run: echo "${{ steps.changelog.outputs.changelog }}" From cecf5b43d065d672c8f644c8e352cc1945c569a3 Mon Sep 17 00:00:00 2001 From: sindhute Date: Tue, 22 Jun 2021 16:11:22 -0400 Subject: [PATCH 08/21] Update cloud-formation-stack-status.yaml --- .github/workflows/cloud-formation-stack-status.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cloud-formation-stack-status.yaml b/.github/workflows/cloud-formation-stack-status.yaml index 26b63e0e..d6f981fe 100644 --- a/.github/workflows/cloud-formation-stack-status.yaml +++ b/.github/workflows/cloud-formation-stack-status.yaml @@ -242,7 +242,7 @@ jobs: - uses: actions/checkout@v2 - name: Generate changelog id: release - uses: metcalfc/changelog-generator@v1.0.0 + uses: heinrichreimer/github-changelog-generator-action@v2.1.1 with: myToken: ${{ secrets.GITHUB_TOKEN }} From 725710191f1e1333a5c3bd0f240f21d01851c5fe Mon Sep 17 00:00:00 2001 From: sindhute Date: Tue, 22 Jun 2021 16:14:21 -0400 Subject: [PATCH 09/21] reduce version --- .github/workflows/cloud-formation-stack-status.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cloud-formation-stack-status.yaml b/.github/workflows/cloud-formation-stack-status.yaml index d6f981fe..521fde4a 100644 --- a/.github/workflows/cloud-formation-stack-status.yaml +++ b/.github/workflows/cloud-formation-stack-status.yaml @@ -242,7 +242,7 @@ jobs: - uses: actions/checkout@v2 - name: Generate changelog id: release - uses: heinrichreimer/github-changelog-generator-action@v2.1.1 + uses: metcalfc/changelog-generator@v0.4.4 with: myToken: ${{ secrets.GITHUB_TOKEN }} From 350903123939600de937d8d4e976bfe7d333f701 Mon Sep 17 00:00:00 2001 From: sindhute Date: Tue, 22 Jun 2021 16:15:38 -0400 Subject: [PATCH 10/21] Update cloud-formation-stack-status.yaml --- .github/workflows/cloud-formation-stack-status.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cloud-formation-stack-status.yaml b/.github/workflows/cloud-formation-stack-status.yaml index 521fde4a..4e19facc 100644 --- a/.github/workflows/cloud-formation-stack-status.yaml +++ b/.github/workflows/cloud-formation-stack-status.yaml @@ -242,9 +242,11 @@ jobs: - uses: actions/checkout@v2 - name: Generate changelog id: release - uses: metcalfc/changelog-generator@v0.4.4 + uses: metcalfc/changelog-generator@v1.0.0 with: myToken: ${{ secrets.GITHUB_TOKEN }} + head-ref: 'v0.0.2' + base-ref: 'v0.0.1' - name: Get the changelog run: echo "${{ steps.changelog.outputs.changelog }}" From 1ba112f7ea6fa1245e533bdc6343dd606794acb3 Mon Sep 17 00:00:00 2001 From: sindhute Date: Tue, 22 Jun 2021 16:29:17 -0400 Subject: [PATCH 11/21] Update cloud-formation-stack-status.yaml --- .github/workflows/cloud-formation-stack-status.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/cloud-formation-stack-status.yaml b/.github/workflows/cloud-formation-stack-status.yaml index 4e19facc..542ca7ee 100644 --- a/.github/workflows/cloud-formation-stack-status.yaml +++ b/.github/workflows/cloud-formation-stack-status.yaml @@ -245,8 +245,7 @@ jobs: uses: metcalfc/changelog-generator@v1.0.0 with: myToken: ${{ secrets.GITHUB_TOKEN }} - head-ref: 'v0.0.2' - base-ref: 'v0.0.1' + - name: Get the changelog run: echo "${{ steps.changelog.outputs.changelog }}" From a732ccba664b4d5411bf6db0352e4dcbbc28b5ac Mon Sep 17 00:00:00 2001 From: sindhute Date: Tue, 22 Jun 2021 16:34:17 -0400 Subject: [PATCH 12/21] Update cloud-formation-stack-status.yaml --- .github/workflows/cloud-formation-stack-status.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cloud-formation-stack-status.yaml b/.github/workflows/cloud-formation-stack-status.yaml index 542ca7ee..90fbc9f5 100644 --- a/.github/workflows/cloud-formation-stack-status.yaml +++ b/.github/workflows/cloud-formation-stack-status.yaml @@ -241,8 +241,8 @@ jobs: steps: - uses: actions/checkout@v2 - name: Generate changelog - id: release - uses: metcalfc/changelog-generator@v1.0.0 + id: changelog + uses: etcdigital/pull-request-changelog@master with: myToken: ${{ secrets.GITHUB_TOKEN }} From 806c44105b1e6e49567cee9270ba8134e59c7227 Mon Sep 17 00:00:00 2001 From: sindhute Date: Tue, 22 Jun 2021 16:35:08 -0400 Subject: [PATCH 13/21] Update cloud-formation-stack-status.yaml --- .github/workflows/cloud-formation-stack-status.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cloud-formation-stack-status.yaml b/.github/workflows/cloud-formation-stack-status.yaml index 90fbc9f5..233eb2ef 100644 --- a/.github/workflows/cloud-formation-stack-status.yaml +++ b/.github/workflows/cloud-formation-stack-status.yaml @@ -244,7 +244,7 @@ jobs: id: changelog uses: etcdigital/pull-request-changelog@master with: - myToken: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} - name: Get the changelog From c0873fe1526ae3c17dbe1ed3b7a08122d9ff315a Mon Sep 17 00:00:00 2001 From: sindhute Date: Tue, 22 Jun 2021 16:38:57 -0400 Subject: [PATCH 14/21] change package --- .github/workflows/cloud-formation-stack-status.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cloud-formation-stack-status.yaml b/.github/workflows/cloud-formation-stack-status.yaml index 233eb2ef..a9992a6a 100644 --- a/.github/workflows/cloud-formation-stack-status.yaml +++ b/.github/workflows/cloud-formation-stack-status.yaml @@ -242,9 +242,9 @@ jobs: - uses: actions/checkout@v2 - name: Generate changelog id: changelog - uses: etcdigital/pull-request-changelog@master - with: - token: ${{ secrets.GITHUB_TOKEN }} + uses: mikepenz/release-changelog-builder-action@{latest-release} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Get the changelog From 3fcd5c47b877a7654b8b7ab177d120894d40c790 Mon Sep 17 00:00:00 2001 From: sindhute Date: Tue, 22 Jun 2021 16:40:54 -0400 Subject: [PATCH 15/21] specify version --- .github/workflows/cloud-formation-stack-status.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cloud-formation-stack-status.yaml b/.github/workflows/cloud-formation-stack-status.yaml index a9992a6a..2c123b5f 100644 --- a/.github/workflows/cloud-formation-stack-status.yaml +++ b/.github/workflows/cloud-formation-stack-status.yaml @@ -242,7 +242,7 @@ jobs: - uses: actions/checkout@v2 - name: Generate changelog id: changelog - uses: mikepenz/release-changelog-builder-action@{latest-release} + uses: mikepenz/release-changelog-builder-action@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 47d04fe22ee9dfb7e46967bbfaa03530669fa352 Mon Sep 17 00:00:00 2001 From: sindhute Date: Tue, 22 Jun 2021 16:48:37 -0400 Subject: [PATCH 16/21] retest --- .../cloud-formation-stack-status.yaml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cloud-formation-stack-status.yaml b/.github/workflows/cloud-formation-stack-status.yaml index 2c123b5f..748da86b 100644 --- a/.github/workflows/cloud-formation-stack-status.yaml +++ b/.github/workflows/cloud-formation-stack-status.yaml @@ -242,14 +242,20 @@ jobs: - uses: actions/checkout@v2 - name: Generate changelog id: changelog - uses: mikepenz/release-changelog-builder-action@v1 + uses: metcalfc/changelog-generator@v1.0.0 + with: + myToken: ${{ secrets.GITHUB_TOKEN }} + - name: Create Release + id: create_release + uses: actions/create-release@latest env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - - name: Get the changelog - run: echo "${{ steps.changelog.outputs.changelog }}" - + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + body: ${{ steps.changelog.outputs.changelog }} + draft: false + prerelease: false From 08015cfe2e9829e67d17aca69b8827338568d17a Mon Sep 17 00:00:00 2001 From: sindhute Date: Thu, 24 Jun 2021 15:51:51 -0400 Subject: [PATCH 17/21] action to update index --- .../cloud-formation-stack-status.yaml | 45 ++++++++++++------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/.github/workflows/cloud-formation-stack-status.yaml b/.github/workflows/cloud-formation-stack-status.yaml index 748da86b..aa4a6343 100644 --- a/.github/workflows/cloud-formation-stack-status.yaml +++ b/.github/workflows/cloud-formation-stack-status.yaml @@ -236,26 +236,37 @@ jobs: --data '{ "body": "The site has been deployed to https://'`cat published_domain_name.txt`'" }' job_4: - name: Generate the Changelog and post it to Slack + name: Update Algolia Search Index runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Generate changelog - id: changelog - uses: metcalfc/changelog-generator@v1.0.0 - with: - myToken: ${{ secrets.GITHUB_TOKEN }} - - name: Create Release - id: create_release - uses: actions/create-release@latest - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - body: ${{ steps.changelog.outputs.changelog }} - draft: false - prerelease: false + - name: Build the site locally and update Algolia search index + shell: bash + run: | + mkdir -p localhost + cd localhost + if [[ -d "tmp" ]]; then + echo "tmp docusaurus install already exists, not installing." + else + npx @docusaurus/init@latest init tmp classic + fi + set -a + source ../site/.env + set +a + cat ../site/config/docusaurus/docusaurus.config.js.template | envsubst > ./tmp/docusaurus.config.js + cp -r ../authenticated-cloud-docs/dmgt-symlinks-plugin ./tmp + cd ./tmp + rm -rf sidebars.js docs src static + ln -s ../../site/content/* . + sudo npm run start -- --port 80 + cd ../.. + pwd && ls -la + set -a + source ./site/.env + set +a + cat ./site/config/algolia/algolia_search.env.template | envsubst > ./algolia_search.env + cat ./site/config/algolia/algolia_search_config.json.template | envsubst > ./algolia_search_config.json + docker run -it --env-file=./algolia_search.env -e "CONFIG=$(cat ./algolia_search_config.json | jq -r tostring)" algolia/docsearch-scraper From a45d22c6fef12d72bf88ab7614c4960b277228c2 Mon Sep 17 00:00:00 2001 From: sindhute Date: Thu, 24 Jun 2021 16:02:44 -0400 Subject: [PATCH 18/21] separate run --- .github/workflows/cloud-formation-stack-status.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cloud-formation-stack-status.yaml b/.github/workflows/cloud-formation-stack-status.yaml index aa4a6343..c7da9ff4 100644 --- a/.github/workflows/cloud-formation-stack-status.yaml +++ b/.github/workflows/cloud-formation-stack-status.yaml @@ -240,7 +240,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Build the site locally and update Algolia search index + - name: Build and run the site locally shell: bash run: | mkdir -p localhost @@ -259,7 +259,9 @@ jobs: rm -rf sidebars.js docs src static ln -s ../../site/content/* . sudo npm run start -- --port 80 - cd ../.. + - name: Update Algolia Search Index + shell: bash + run: | pwd && ls -la set -a source ./site/.env From 18f564afb539205efc97b176d3a333d37da4f55d Mon Sep 17 00:00:00 2001 From: sindhute Date: Fri, 25 Jun 2021 16:13:25 -0400 Subject: [PATCH 19/21] run in same step --- .github/workflows/cloud-formation-stack-status.yaml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cloud-formation-stack-status.yaml b/.github/workflows/cloud-formation-stack-status.yaml index c7da9ff4..cbe6bbea 100644 --- a/.github/workflows/cloud-formation-stack-status.yaml +++ b/.github/workflows/cloud-formation-stack-status.yaml @@ -240,7 +240,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Build and run the site locally + - name: Run the site locally and update the search index shell: bash run: | mkdir -p localhost @@ -258,10 +258,8 @@ jobs: cd ./tmp rm -rf sidebars.js docs src static ln -s ../../site/content/* . - sudo npm run start -- --port 80 - - name: Update Algolia Search Index - shell: bash - run: | + sudo npm run start -- --port 80 & + cd ../.. pwd && ls -la set -a source ./site/.env @@ -271,4 +269,3 @@ jobs: docker run -it --env-file=./algolia_search.env -e "CONFIG=$(cat ./algolia_search_config.json | jq -r tostring)" algolia/docsearch-scraper - From 83f4f7c478dd1899f50f8658e9a8bc739bc016a8 Mon Sep 17 00:00:00 2001 From: sindhute Date: Fri, 25 Jun 2021 16:36:46 -0400 Subject: [PATCH 20/21] ps on current port --- .github/workflows/cloud-formation-stack-status.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cloud-formation-stack-status.yaml b/.github/workflows/cloud-formation-stack-status.yaml index cbe6bbea..a8813e51 100644 --- a/.github/workflows/cloud-formation-stack-status.yaml +++ b/.github/workflows/cloud-formation-stack-status.yaml @@ -259,6 +259,7 @@ jobs: rm -rf sidebars.js docs src static ln -s ../../site/content/* . sudo npm run start -- --port 80 & + sudo lsof -i:80 cd ../.. pwd && ls -la set -a From 07730fbfb3510f7d6bbe78dfcc290066cf68a179 Mon Sep 17 00:00:00 2001 From: sindhute Date: Fri, 9 Jul 2021 17:51:21 -0400 Subject: [PATCH 21/21] run in background --- .github/workflows/cloud-formation-stack-status.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cloud-formation-stack-status.yaml b/.github/workflows/cloud-formation-stack-status.yaml index 06505e5e..8c579407 100644 --- a/.github/workflows/cloud-formation-stack-status.yaml +++ b/.github/workflows/cloud-formation-stack-status.yaml @@ -266,7 +266,7 @@ jobs: cd ./tmp rm -rf sidebars.js docs src static ln -s ../../site/content/* . - sudo npm run start -- --port 80 & + BROWSER=none sudo npm run start -- --port 80 | cat - & sudo lsof -i:80 cd ../.. pwd && ls -la