From 4c8763c589f4e4def53d8ad671fffe1a4c5952a0 Mon Sep 17 00:00:00 2001 From: Josh Crites Date: Wed, 16 Apr 2025 10:49:28 -0400 Subject: [PATCH 1/8] add back docs build, rm typesense action --- .github/workflows/reindex-typesense.yml | 23 ----------------------- bootstrap.sh | 4 ++-- docs/bootstrap.sh | 3 +++ 3 files changed, 5 insertions(+), 25 deletions(-) delete mode 100644 .github/workflows/reindex-typesense.yml diff --git a/.github/workflows/reindex-typesense.yml b/.github/workflows/reindex-typesense.yml deleted file mode 100644 index 553f7282ef9f..000000000000 --- a/.github/workflows/reindex-typesense.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Reindex TypeSense - -on: - release: - types: [prereleased, published] -jobs: - reindex: - name: Reindex docs in TypeSense - runs-on: ubuntu-latest - - steps: - - name: Check out the repo - uses: actions/checkout@v3 - - - name: Reindex with docsearch-scraper - run: | - docker run \ - -e "TYPESENSE_API_KEY=${{ secrets.TYPESENSE_API_KEY }}" \ - -e "TYPESENSE_HOST=${{ secrets.TYPESENSE_HOST }}" \ - -e "TYPESENSE_PORT=443" \ - -e "TYPESENSE_PROTOCOL=https" \ - -e "CONFIG=$(cat docs/typesense.config.json | jq -r tostring)" \ - typesense/docsearch-scraper:0.11.0 diff --git a/bootstrap.sh b/bootstrap.sh index 4b8c017811de..c252bfce3543 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -197,7 +197,7 @@ function build { yarn-project boxes playground - # docs + docs release-image aztec-up ) @@ -269,7 +269,7 @@ function release { boxes aztec-up playground - # docs + docs release-image ) if [ $(arch) == arm64 ]; then diff --git a/docs/bootstrap.sh b/docs/bootstrap.sh index 075260e05953..e624eec45884 100755 --- a/docs/bootstrap.sh +++ b/docs/bootstrap.sh @@ -42,6 +42,9 @@ case "$cmd" in "hash") echo "$hash" ;; + "release") + build_docs + ;; "release-preview") release_preview ;; From cdbf159405fcb90504fdb3c7c0bfebaeb2e00999 Mon Sep 17 00:00:00 2001 From: Josh Crites Date: Wed, 16 Apr 2025 10:58:28 -0400 Subject: [PATCH 2/8] use release command in bootstrap --- .github/workflows/docs-deploy.yml | 10 +--------- docs/bootstrap.sh | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml index 95091ee3fd8a..b0df5f0f5eb7 100644 --- a/.github/workflows/docs-deploy.yml +++ b/.github/workflows/docs-deploy.yml @@ -46,15 +46,7 @@ jobs: - name: Deploy docs working-directory: ./docs run: | - echo "deploying docs to prod" - yarn install - yarn build - - if ! deploy_output=$(yarn netlify deploy --site aztec-docs-dev --prod 2>&1); then - echo "Netlify deploy failed with error:" - echo "$deploy_output" - exit 1 - fi + ./bootsrap.sh release - name: Reindex with Typesense docsearch-scraper run: | diff --git a/docs/bootstrap.sh b/docs/bootstrap.sh index e624eec45884..03a60129cc78 100755 --- a/docs/bootstrap.sh +++ b/docs/bootstrap.sh @@ -32,18 +32,30 @@ function build_docs { cache_upload docs-$hash.tar.gz build } +function release_docs { + echo "deploying docs to prod" + yarn install + yarn build + + if ! deploy_output=$(yarn netlify deploy --site aztec-docs-dev --prod 2>&1); then + echo "Netlify deploy failed with error:" + echo "$deploy_output" + exit 1 + fi +} + case "$cmd" in "clean") git clean -fdx ;; - ""|"full"|"fast") + "" | "full" | "fast") build_docs ;; "hash") echo "$hash" ;; "release") - build_docs + release_docs ;; "release-preview") release_preview From b81a5f049e4f98c03c3cb34e74dd83132c5bd70a Mon Sep 17 00:00:00 2001 From: Josh Crites Date: Wed, 16 Apr 2025 10:58:57 -0400 Subject: [PATCH 3/8] make the update docs job run on merge --- .github/workflows/release-please.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 19d18b6ac2ac..f8d1f69a030a 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -33,7 +33,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }} needs: [release-please] - if: ${{ needs.release-please.outputs.release-pr }} runs-on: ubuntu-latest steps: From 3522c5a5e809643a019c24ad7f14aed58b817402 Mon Sep 17 00:00:00 2001 From: Josh Crites Date: Wed, 16 Apr 2025 11:13:49 -0400 Subject: [PATCH 4/8] fmt --- docs/bootstrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/bootstrap.sh b/docs/bootstrap.sh index 03a60129cc78..f84918953241 100755 --- a/docs/bootstrap.sh +++ b/docs/bootstrap.sh @@ -48,7 +48,7 @@ case "$cmd" in "clean") git clean -fdx ;; - "" | "full" | "fast") + ""|"full"|"fast") build_docs ;; "hash") From 68ad8fdd7334abb6ce1beb36d8d88d38400f8183 Mon Sep 17 00:00:00 2001 From: Josh Crites Date: Wed, 16 Apr 2025 11:23:19 -0400 Subject: [PATCH 5/8] rm unused fn --- docs/bootstrap.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/bootstrap.sh b/docs/bootstrap.sh index f84918953241..cb5bca858326 100755 --- a/docs/bootstrap.sh +++ b/docs/bootstrap.sh @@ -57,9 +57,6 @@ case "$cmd" in "release") release_docs ;; - "release-preview") - release_preview - ;; *) echo "Unknown command: $cmd" exit 1 From eabb23e3fe5f2b1e7bf067b664e43493a0a9d05b Mon Sep 17 00:00:00 2001 From: Josh Crites Date: Wed, 16 Apr 2025 11:30:29 -0400 Subject: [PATCH 6/8] rm docs from release flow --- bootstrap.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index c252bfce3543..5ae15f417c36 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -247,7 +247,7 @@ function release { # + noir # + yarn-project => NPM publish to dist tag, version is our REF_NAME without a leading v. # aztec-up => upload scripts to prod if dist tag is latest - # docs, playground => publish if dist tag is latest. TODO Link build in github release. + # playground => publish if dist tag is latest. TODO Link build in github release. # release-image => push docker image to dist tag. # boxes/l1-contracts => mirror repo to branch equal to dist tag (master if latest). Also mirror to tag equal to REF_NAME. @@ -269,7 +269,7 @@ function release { boxes aztec-up playground - docs + # docs # released here /.github/workflows/docs-deploy.yml release-image ) if [ $(arch) == arm64 ]; then From 427b5ed091046ec832f9c33661baff455f0f38c4 Mon Sep 17 00:00:00 2001 From: Josh Crites Date: Wed, 16 Apr 2025 11:32:30 -0400 Subject: [PATCH 7/8] clarify run location --- .github/workflows/docs-deploy.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml index b0df5f0f5eb7..3b43436ba460 100644 --- a/.github/workflows/docs-deploy.yml +++ b/.github/workflows/docs-deploy.yml @@ -44,9 +44,8 @@ jobs: # Making the bash script here so we don't accidentally deploy - name: Deploy docs - working-directory: ./docs run: | - ./bootsrap.sh release + ./docs/bootstrap.sh release - name: Reindex with Typesense docsearch-scraper run: | From bdb1cff2eaf5c5e93c4648318ac0735184089b4a Mon Sep 17 00:00:00 2001 From: Josh Crites Date: Wed, 16 Apr 2025 16:26:46 -0400 Subject: [PATCH 8/8] revert update-docs condition in release-please --- .github/workflows/release-please.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index f8d1f69a030a..19d18b6ac2ac 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -33,6 +33,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }} needs: [release-please] + if: ${{ needs.release-please.outputs.release-pr }} runs-on: ubuntu-latest steps: