Skip to content

5.3.11

5.3.11 #9

Workflow file for this run

name: Deploy to Vercel
on:
push:
tags:
- 'mainnet-*'
- 'testnet-*'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Cache Node.js modules
id: cache-node-modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm install
- name: Install Vercel CLI
run: npm install -g vercel
- name: Pull Vercel project settings
run: vercel pull --scope=aresrpg --yes --token ${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
- name: Build Vite project
run: npm run build
- name: Build Vercel output
run: vercel build
- name: Deploy to Vercel (Production)
if: startsWith(github.ref, 'refs/tags/mainnet-')
run: vercel deploy --scope=aresrpg --prebuilt --prod --token ${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
- name: Deploy to Vercel (Testnet)
if: startsWith(github.ref, 'refs/tags/testnet-')
run: |
url=$(vercel deploy --scope=aresrpg --prebuilt --token ${{ secrets.VERCEL_TOKEN }})
echo $url
vercel alias set $url testnet.aresrpg.world --scope=aresrpg --token ${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}