diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 69b3466..e1162fd 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,14 +13,24 @@ jobs: steps: - uses: actions/checkout@v2 - - run: make test - - run: make dist - - - run: make dist-deploy + - name: Test the code (lint) + run: make test + - name: Package the code + run: make dist + + - name: Branch based code deployment + run: make dist-deploy if: github.event_name == 'push' env: - CIRCLE_BRANCH: ${{GITHUB_REF_NAME}} - - run: make dist-deploy + CIRCLE_BRANCH: "${GITHUB_REF_NAME}" + AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }} + AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }} + AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }} + - name: Tag based code deployment + run: make dist-deploy if: github.event_name == 'create' env: - CIRCLE_TAG: ${{GITHUB_REF_NAME}} + CIRCLE_TAG: "${GITHUB_REF_NAME}" + AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }} + AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }} + AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }}