diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5022f5e1..2551bf4f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,11 +36,11 @@ jobs: run: | bash ./scripts/run-tests.sh - - name: Deploy to stage - if: github.event_name == 'push' && github.ref == 'refs/heads/redesign' + - name: Deploy to prod + if: github.event_name == 'push' && github.ref == 'refs/heads/develop' env: DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} - DEPLOY_URL: ${{ secrets.STAGE_DEPLOY_URL }} + DEPLOY_URL: ${{ secrets.DEPLOY_URL }} DEPLOY_HEADER: ${{ secrets.DEPLOY_HEADER }} LIVE_SITE: ${{ secrets.LIVE_SITE }} run: | @@ -60,15 +60,3 @@ jobs: export DEPLOY_CONTENT='{"GITHUB_RUN_NUMBER":"'$GITHUB_RUN_NUMBER'","GITHUB_SHA":"'$GITHUB_SHA'","GITHUB_REF":"'$GITHUB_REF'","GITHUB_REPOSITORY":"'$GITHUB_REPOSITORY'","GITHUB_ACTOR":"'$GITHUB_ACTOR'"}' ; export DEPLOY_SIG="sha1=`echo -n "$DEPLOY_CONTENT" | openssl sha1 -hmac $DEPLOY_KEY | sed 's/^.* //'`" ; curl -X POST "$DEPLOY_URL" --data "$DEPLOY_CONTENT" -H "Content-Type: application/json" -H "$DEPLOY_HEADER: $DEPLOY_SIG" ; - - - name: Deploy to prod - if: github.event_name == 'push' && github.ref == 'refs/heads/develop' - env: - DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} - DEPLOY_URL: ${{ secrets.DEPLOY_URL }} - DEPLOY_HEADER: ${{ secrets.DEPLOY_HEADER }} - run: | - set -x - export DEPLOY_CONTENT='{"GITHUB_RUN_NUMBER":"'$GITHUB_RUN_NUMBER'","GITHUB_SHA":"'$GITHUB_SHA'","GITHUB_REF":"'$GITHUB_REF'","GITHUB_REPOSITORY":"'$GITHUB_REPOSITORY'","GITHUB_ACTOR":"'$GITHUB_ACTOR'"}' ; - export DEPLOY_SIG="sha1=`echo -n "$DEPLOY_CONTENT" | openssl sha1 -hmac $DEPLOY_KEY | sed 's/^.* //'`" ; - curl -X POST "$DEPLOY_URL" --data "$DEPLOY_CONTENT" -H "Content-Type: application/json" -H "$DEPLOY_HEADER: $DEPLOY_SIG" ;