Skip to content

Manually Test and Deploy Branch to Vercel #14

Manually Test and Deploy Branch to Vercel

Manually Test and Deploy Branch to Vercel #14

name: Manually Test and Deploy Branch to Vercel
on:
workflow_dispatch:
jobs:
call_build:
name: Build
uses: ./.github/workflows/build.yml
secrets: inherit
ember_test:
name: Ember Testing
needs: call_build
uses: ./.github/workflows/ember_test.yml
secrets: inherit
cypress_test:
name: Cypress Testing
needs: call_build
uses: ./.github/workflows/cypress_test.yml
secrets: inherit
deploy:
needs: [call_build, ember_test, cypress_test]
runs-on: ubuntu-latest
environment: vercel-bracco-preview
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Extract variables
shell: bash
run: |
echo "BRANCH=$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//_/g')" >> $GITHUB_OUTPUT
echo "GIT_SHA=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
echo "GIT_SHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
id: extract_variables
- name: Vercel deploy staging
uses: amondnet/[email protected]
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.ORG_ID}}
vercel-project-id: ${{ secrets.PROJECT_ID}}
vercel-args: ${{ vars.VERCEL_NOCACHE == 'true' && '--force' || '' }} --build-env HANDLE_SERVER=${{vars.HANDLE_SERVER}}
scope: ${{ secrets.TEAM_ID}}
vercel-project-name: 'bracco'