[MOD] Refactor server and dockerfile #3
Workflow file for this run
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
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 }} |