From 73a0cae29d16879fcfd920e50ca5e8a4a53705e9 Mon Sep 17 00:00:00 2001 From: Ron Richardson Date: Tue, 7 Nov 2023 08:22:34 -0500 Subject: [PATCH] added gha for web deploy --- .github/workflows/deploy-web.yml | 25 +++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 .github/workflows/deploy-web.yml diff --git a/.github/workflows/deploy-web.yml b/.github/workflows/deploy-web.yml new file mode 100644 index 0000000..2487a4c --- /dev/null +++ b/.github/workflows/deploy-web.yml @@ -0,0 +1,25 @@ +name: Deploy web to S3 +on: workflow_dispatch +jobs: + run: + runs-on: ubuntu-latest + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_ID }} + AWS_REGION: ${{ vars.AWS_DEFAULT_REGION }} + steps: + - name: Checkout Code + uses: actions/checkout@v1 + + - name: Deploy + uses: reggionick/s3-deploy@v3 + with: + folder: mamd-web + bucket: ${{ vars.PRODUCTION_S3_BUCKET }} + bucket-region: ${{ vars.AWS_DEFAULT_REGION }} + dist-id: ${{ vars.PRODUCTION_CLOUDFRONT_DISTRIBUTION_ID }} + invalidation: / + delete-removed: true + no-cache: true + private: true + filesToInclude: ".*/*,*/*,**" \ No newline at end of file diff --git a/README.md b/README.md index 7b77b6f..692abf5 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,8 @@ docker push rer145/mamd-api-base The mamd-api project builds a Docker container with the analytical data and script to perform the analysis. It relies on the mamd-api-base to setup rstudio/plumber and constantly runs, waiting for inputs from the mamd-web project. +This container is currently running on an AWS Lightsail instance (Micro x1 - 1gb, 0.25 vCPUs). + **Building/Deploying** ``` docker build -t mamd-api .