Skip to content

[MOD] Refactor server and dockerfile #3

[MOD] Refactor server and dockerfile

[MOD] Refactor server and dockerfile #3

Workflow file for this run

name: Surge Deploy
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
name: Deploying to surge
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: |
app
- name: Create .env file
run: |
touch ./app/.env
echo VITE_SERVER_URL=${{ vars.SERVER_URL }} >> ./app/.env
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Build app
run: |
npm --prefix ./app install
npm --prefix ./app build
- name: Deploy to surge
run: |
npm install -g surge
surge ./app/dist ${{ vars.SURGE_DOMAIN }} --token ${{ secrets.SURGE_TOKEN }}