diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml index 95091ee3fd8a..3b43436ba460 100644 --- a/.github/workflows/docs-deploy.yml +++ b/.github/workflows/docs-deploy.yml @@ -44,17 +44,8 @@ jobs: # Making the bash script here so we don't accidentally deploy - 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 + ./docs/bootstrap.sh release - name: Reindex with Typesense docsearch-scraper run: | 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..5ae15f417c36 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -197,7 +197,7 @@ function build { yarn-project boxes playground - # docs + docs release-image aztec-up ) @@ -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 diff --git a/docs/bootstrap.sh b/docs/bootstrap.sh index 075260e05953..cb5bca858326 100755 --- a/docs/bootstrap.sh +++ b/docs/bootstrap.sh @@ -32,6 +32,18 @@ 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 @@ -42,8 +54,8 @@ case "$cmd" in "hash") echo "$hash" ;; - "release-preview") - release_preview + "release") + release_docs ;; *) echo "Unknown command: $cmd"