From a0a54f2844a26e82356653ae2f1c9e8dfcbfca7e Mon Sep 17 00:00:00 2001 From: bobiesco <120151683+bobiesco@users.noreply.github.com> Date: Wed, 15 Mar 2023 20:23:10 -0500 Subject: [PATCH] Update ci.yml --- .github/workflows/ci.yml | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 678cb9b..4deae1e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,6 @@ -name: deploy go app -on: + + name: deploy go app + on: push: branches: [ "development" ] pull_request: @@ -14,12 +15,21 @@ jobs: - name: Go build run: go build main.go - name: go test - run: go test -v -###TODO: setup aws s3 deployment for private - - deploy-app: + run: go test -v + - name: Upload artifact to S3 bucket + - uses: actions/upload-artifact@v2 + with: + name: go-app + path: go-app + deploy-to-staging: + needs: build-app runs-on: ubuntu-latest - steps: - - uses: - - + if: github.ref == 'refs/heads/staging' + steps: + - name: Download artifact from development build + - uses: actions/download-artifact@v2 + with: + name: go-app + - name: Deploy to staging environment + run: | + # Add commands to deploy to staging environment