From cf591389429fc036e40e3be6adb16e9e50f436e5 Mon Sep 17 00:00:00 2001 From: Dana Merrick Date: Sat, 30 Jan 2021 16:04:01 -0500 Subject: [PATCH] Updates --- .github/workflows/release.yml | 25 +++++++++++++++++++++++++ .github/workflows/testing.yml | 5 +---- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2b1539f..7bedf13 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,6 +10,31 @@ jobs: steps: - id: get-version uses: battila7/get-version-action@v2 + - name: Install Ruby + uses: actions/setup-ruby@v1 + with: + #TODO: bring this back to 2.7 + ruby-version: '2.6' + - uses: actions/checkout@v2 + - uses: actions/cache@v1 + with: + path: vendor/bundle + key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + ${{ runner.os }}-gems- + - name: Install Gems + run: | + gem install bundler + bundle config path vendor/bundle + bundle install --jobs 4 --retry 3 + - name: Build the static site + run: bundle exec middleman build --bail + - name: Push the static site to prod + env: + AWS_ACCESS_KEY_ID: ${{ secrets.CI_PROD_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_PROD_AWS_SECRET_ACCESS_KEY }} + PROD_S3_BUCKET: ${{ secrets.PROD_S3_BUCKET }} + run: aws s3 sync build $PROD_S3_BUCKET/build/ - name: Post Discord notification if: startsWith(github.ref, 'refs/tags/v') diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index e910a97..a262921 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -27,12 +27,9 @@ jobs: - run: echo $ENV - name: Attempt to build the static site run: bundle exec middleman build --bail - #TODO: actually do the push - name: Push the static site to stage env: AWS_ACCESS_KEY_ID: ${{ secrets.CI_AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_AWS_SECRET_ACCESS_KEY }} - # AWS_ROLE_ARN: ${{ secrets.CI_STAGE_AWS_ROLE_ARN }} STAGE_S3_BUCKET: ${{ secrets.STAGE_S3_BUCKET }} - run: aws s3 ls $STAGE_S3_BUCKET - # run: aws --role-arn $AWS_ROLE_ARN s3 ls $STAGE_S3_BUCKET + run: aws s3 sync build $STAGE_S3_BUCKET/build/