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