Skip to content

Dropdown, DatePicker, CheckboxText Components #262

Dropdown, DatePicker, CheckboxText Components

Dropdown, DatePicker, CheckboxText Components #262

Workflow file for this run

name: deploy website
# On pull request, make a deployment to Preview
# On merge into main, make a deployment to Develop
# On merge into prod, flag prod, make a deployment to Production
on:
push:
branches: [main, production, linting]
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Install dependencies
run: cd web && yarn install --frozen-lockfile
- name: Lint files and run type-checks
run: cd web && yarn lint
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set pipeline
id: pipeline
# if its a PR, then its for preview, else its for development or prod based on what it's being pushed to.
run: echo ::set-output name=pipeline::${{ github.event_name == 'pull_request' && 'Preview' || (github.ref == 'refs/heads/production' && 'Production' || 'Development') }}
- uses: chrnorm/deployment-action@releases/v1
name: Create GitHub deployment
id: deployment
with:
token: "${{ github.token }}"
environment: ${{ steps.pipeline.outputs.pipeline }}
target_url: ""
- uses: amondnet/vercel-action@v19
name: Deploy to Vercel
id: vercel_deploy
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required
github-token: ${{ secrets.GITHUB_TOKEN }} #Optional
vercel-args: ${{ steps.pipeline.outputs.pipeline == 'Production' && '--prod' || null}} #Optional
vercel-org-id: ${{ secrets.ORG_ID}} #Required
vercel-project-id: ${{ secrets.PROJECT_ID}} #Required
# working-directory: ./web #Your Working Directory, Optional
# alias-domains: | #Optional, for when an actual domain is provided
# staging.angular.vercel-action.amond.dev
# pr-{{PR_NUMBER}}.angular.vercel-action.amond.dev
- name: Update deployment status (success)
if: success()
uses: chrnorm/deployment-status@releases/v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
target_url: ${{ steps.vercel_deploy.outputs.preview-url }}
environment_url: ${{ steps.vercel_deploy.outputs.preview-url }}
state: "success"
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
- name: Update deployment status (failure)
if: failure()
uses: chrnorm/deployment-status@releases/v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
target_url: ${{ steps.vercel_deploy.outputs.preview-url }}
environment_url: ${{ steps.vercel_deploy.outputs.preview-url }}
state: "failure"
deployment_id: ${{ steps.deployment.outputs.deployment_id }}