825 automate preview deployment #13
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Vercel preview apps on label | |
on: | |
pull_request: | |
types: [labeled] | |
jobs: | |
deploy: | |
if: ${{ github.event.label.name == 'create preview app' }} | |
runs-on: ubuntu-latest | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Vercel deploy | |
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' || '' }} | |
scope: ${{ secrets.TEAM_ID}} | |
vercel-project-name: 'bracco' | |
- name: Remove label | |
uses: fastruby/pr-unlabeler@v1 | |
with: | |
label-to-remove: "create preview app" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |