Push docs to root instead of /preview (#1351)

## Description

Push docs to root instead of /preview

## Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Test
- [x] 💻 CI/Deployment
- [ ] 🐹 Trivial/Minor

## Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
* fixes https://github.com/alcionai/corso/issues/1327

## Test Plan

<!-- How will this be tested prior to merging.-->
- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
This commit is contained in:
Abin Simon 2022-10-28 09:59:07 +05:30 committed by GitHub
parent a7d9170c61
commit 8900f6dff9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@ on:
branches: [main]
push:
branches: [main]
tags: [ 'v*.*.*' ]
tags: ["v*.*.*"]
permissions:
# required to retrieve AWS credentials
@ -20,7 +20,6 @@ concurrency:
cancel-in-progress: true
jobs:
# ----------------------------------------------------------------------------------------------------
# --- Prechecks and Checkouts ------------------------------------------------------------------------
# ----------------------------------------------------------------------------------------------------
@ -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 }}
@ -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'