From 7daa5422247d10810e7fc41d269f5a2587fd5f38 Mon Sep 17 00:00:00 2001 From: Roman Ruiz-Esparza <2654709+rjruizes@users.noreply.github.com> Date: Mon, 16 Oct 2023 15:06:21 -0400 Subject: [PATCH] try deploy --- .github/workflows/ci.yml | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8146a11..feccc91 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,19 +13,22 @@ jobs: - run: npm ci - run: npm run lint --no-fix --no-error-on-unmatched-pattern - run: npm test - - run: npm run docs:generate - - run: npm run docs:build - # - name: Build and Deploy Docs - # if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch' - # run: | - # docker exec -t harness-vue-ci npm run docs:generate - # docker exec -t harness-vue-ci npm run docs:build - # # docker exec -t harness-vue-ci aws configure set region us-east-1 - # # docker exec -t harness-vue-ci aws configure set aws_access_key_id ${{ secrets.S3_ONLY_AWS_ACCESS_KEY_ID }} - # # docker exec -t harness-vue-ci aws configure set aws_secret_access_key ${{ secrets.S3_ONLY_AWS_SECRET_ACCESS_KEY }} - # # docker exec -t harness-vue-ci aws s3 rm s3://harness-docs --recursive - # # docker exec -t harness-vue-ci aws s3 sync docs/.vitepress/dist s3://harness-docs - # # docker exec -t harness-vue-ci aws cloudfront create-invalidation --distribution-id E3K46T9KULV7VZ --paths "/*" + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.S3_ONLY_AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.S3_ONLY_AWS_SECRET_ACCESS_KEY }} + aws-region: us-east-1 + + - name: Build and deploy + if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch' + run: | + npm run docs:generate + npm run docs:build + aws s3 rm s3://harness-docs --recursive + aws s3 sync docs/.vitepress/dist s3://harness-docs + aws cloudfront create-invalidation --distribution-id E3K46T9KULV7VZ --paths "/*" + \ No newline at end of file