Skip to content

5.3.20

5.3.20 #19

Workflow file for this run

name: Deploy to Vercel
on:
push:
tags:
- 'mainnet-*'
- 'testnet-*'
jobs:
install:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js and install dependencies with cache
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: |
**/package-lock.json
**/package.json
- name: Install dependencies
run: npm install
- name: Install Vercel CLI
run: npm install -g vercel
deploy-mainnet:
needs: install
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/mainnet-')
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js and install dependencies with cache
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: |
**/package-lock.json
**/package.json
- name: Install Vercel CLI
run: npm install -g vercel
- name: Pull Vercel project settings (Production)
run: vercel pull --scope=aresrpg --yes --environment=production --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 (Production)
run: vercel build --prod
- name: Deploy to Vercel (Production)
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 }}
deploy-testnet:
needs: install
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/testnet-')
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js and install dependencies with cache
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: |
**/package-lock.json
**/package.json
- name: Install Vercel CLI
run: npm install -g vercel
- name: Pull Vercel project settings (Preview)
run: vercel pull --scope=aresrpg --yes --environment=preview --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 (Preview)
run: vercel build
- name: Deploy to Vercel (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 }}