Merge pull request #163 from openreplay/dynatrace-integration #690
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: [main] | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_CONTENT_ACCESS_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_CONTENT_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: eu-west-1 | |
AWS_S3_BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }} | |
AWS_CF_DISTRIBUTION_ID: ${{ secrets.AWS_CF_DISTRIBUTION_ID }} | |
PUBLIC_ALGOLIA_KEY: ${{ secrets.PUBLIC_ALGOLIA_KEY}} | |
PUBLIC_ALGOLIA_SECRET: ${{ secrets.PUBLIC_ALGOLIA_SECRET}} | |
PUBLIC_ALGOLIA_INDEX: ${{ secrets.PUBLIC_ALGOLIA_INDEX}} | |
ALGOLIA_ADMIN_SECRET: ${{ secrets.ALGOLIA_ADMIN_SECRET}} | |
DOCS_KEY: ${{ secrets.DOCS_KEY }} | |
PUBLIC_SITE_URL: ${{ secrets.PUBLIC_SITE_URL}} | |
NODE_OPTIONS: "--max_old_space_size=15360" | |
jobs: | |
build-and-deploy: | |
name: Build and Deploy | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Set Swap Space | |
uses: actionhippie/swap-space@v1 | |
with: | |
size: 10G | |
- run: npm install | |
- run: npm run build | |
- run: aws s3 sync ./dist/ s3://openreplay-documentation --acl public-read --exact-timestamps | |
- run: aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CF_DISTRIBUTION_ID}} --paths "/*" | |