Skip to content

Merge pull request #367 from samternent/changeset-release/main #5

Merge pull request #367 from samternent/changeset-release/main

Merge pull request #367 from samternent/changeset-release/main #5

name: Release Walls of Light
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_WALLS_OF_LIGHT_PROJECT_ID }}
PNPM_CACHE_PATH: ~/.pnpm-store
PNPM_CACHE_NAME: pnpm-store-cache
on:
push:
tags:
- "walls-of-light-[0-9]+.[0-9]+.[0-9]+"
jobs:
Deploy-Production:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout repo
uses: actions/checkout@master
with:
fetch-depth: 0
persist-credentials: false
- name: Get branch name
id: branch
run: |
echo "branch_name=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV
- name: Get node version
id: nvmrc
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install Vercel CLI
run: pnpm install --global vercel@latest
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build libs
run: pnpm build:ternent-ui
- name: Link Vercel project
run: vercel link --yes --cwd ${{ github.workspace }}/apps/walls-of-light --token=${{ secrets.VERCEL_TOKEN }}
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --cwd ${{ github.workspace }}/apps/walls-of-light --token=${{ secrets.VERCEL_TOKEN }}
- name: Link Vercel project to root
run: cp -r ${{ github.workspace }}/apps/walls-of-light/.vercel ${{ github.workspace }}/
- name: Build Vercel Environment Information
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}