From 8900f6dff93ce4639726d0bfcbfe2ec40baa132c Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Fri, 28 Oct 2022 09:59:07 +0530 Subject: [PATCH] Push docs to root instead of /preview (#1351) ## Description Push docs to root instead of /preview ## Type of change - [ ] :sunflower: Feature - [ ] :bug: Bugfix - [ ] :world_map: Documentation - [ ] :robot: Test - [x] :computer: CI/Deployment - [ ] :hamster: Trivial/Minor ## Issue(s) * fixes https://github.com/alcionai/corso/issues/1327 ## Test Plan - [x] :muscle: Manual - [ ] :zap: Unit test - [ ] :green_heart: E2E --- .github/workflows/ci.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fed56c05c..accac449d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,10 +2,10 @@ name: Build/Release Corso on: workflow_dispatch: pull_request: - branches: [ main ] + branches: [main] push: - branches: [ main ] - tags: [ 'v*.*.*' ] + branches: [main] + tags: ["v*.*.*"] permissions: # required to retrieve AWS credentials @@ -20,7 +20,6 @@ concurrency: cancel-in-progress: true jobs: - # ---------------------------------------------------------------------------------------------------- # --- Prechecks and Checkouts ------------------------------------------------------------------------ # ---------------------------------------------------------------------------------------------------- @@ -138,7 +137,7 @@ jobs: AZURE_CLIENT_ID: ${{ secrets.CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} AZURE_TENANT_ID: ${{ secrets.TENANT_ID }} - CORSO_CI_TESTS: true + CORSO_CI_TESTS: true CORSO_M356_TEST_USER_ID: ${{ secrets.CORSO_M356_TEST_USER_ID }} CORSO_PASSPHRASE: ${{ secrets.INTEGRATION_TEST_CORSO_PASSPHRASE }} run: | @@ -227,8 +226,6 @@ jobs: echo "::set-output name=version::$(echo unreleased-$(git rev-parse --short HEAD))" fi - - Publish-Binary: needs: [Test-Suite, Linting, Docs-Linting, SetEnv] environment: ${{ needs.SetEnv.outputs.environment }} @@ -241,7 +238,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - fetch-depth: 0 # needed to pull changelog + fetch-depth: 0 # needed to pull changelog - name: Setup Golang with cache uses: magnetikonline/action-golang-cache@v3 @@ -297,13 +294,17 @@ jobs: CORSO_VERSION: ${{ needs.SetEnv.outputs.version }} run: | npm ci - CORSO_DOCS_BASEURL="/preview/" npm run build # TODO: update base url once finalized + npm run build + + - name: Add rotbots.txt + if: github.ref == 'refs/heads/main' + run: | + printf 'User-agent: *\nDisallow: /' > build/robots.txt - name: Push docs if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' run: | - echo "$DOCS_BUCKET" | base64 - aws s3 sync build "s3://${{ secrets.DOCS_S3_BUCKET }}/preview" + aws s3 sync build "s3://${{ secrets.DOCS_S3_BUCKET }}" - name: Invalidate cloudfront if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'