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
# This workflow will do a clean installation of the dependencies, cache/restore them, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: "Deploy CI" | |
on: | |
release: | |
types: | |
- published | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
vercel: | |
runs-on: ubuntu-latest | |
name: "Deploy application" | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: "21" | |
registry-url: https://registry.npmjs.org/ | |
- name: "Deploy application" | |
run: | | |
prodRun="" | |
if [[ ${GITHUB_REF} == "refs/heads/master" ]]; then | |
prodRun="--prod" | |
fi | |
npx vercel --confirm --token ${VERCEL_TOKEN} $prodRun | |
env: | |
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} |