diff --git a/.github/workflows/dev-depoly.yml b/.github/workflows/dev-depoly.yml new file mode 100644 index 00000000..2a06b997 --- /dev/null +++ b/.github/workflows/dev-depoly.yml @@ -0,0 +1,41 @@ +name: Dev-Deploy + +on: + workflow_run: + workflows: + - 'Dev-Test' + types: + - 'completed' + +permissions: + id-token: write # This is required for requesting the JWT + contents: read # This is required for actions/checkout + +jobs: + on-success: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Configure AWS credentials from AWS account + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.AWS_ROLE_DEV }} + aws-region: us-east-1 + role-session-name: GitHub-OIDC-frontend + + - name: Checkout Docker configs + run: | + git clone -b develop https://github.com/ecds/readux-configs.git + mv readux-configs/* . + chmod +x deploy.sh + ./deploy.sh + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} + DATABASE_URL: ${{ secrets.DATABASE_URL_DEV }} + EMAIL_USER: ${{ secrets.EMAIL_USER }} + EMAIL_PASSWORD: ${{ secrets.EMAIL_PASSWORD }} + diff --git a/.github/workflows/dev-test.yml b/.github/workflows/dev-test.yml index a4963795..59324c8e 100644 --- a/.github/workflows/dev-test.yml +++ b/.github/workflows/dev-test.yml @@ -4,9 +4,6 @@ on: push: branches: - develop - # pull_request: - # branches: - # - develop env: DATABASE_URL: postgres://user:password@localhost:5432/readux