Skip to content

test: is in week day matrix test #44

test: is in week day matrix test

test: is in week day matrix test #44

name: Frontend deploy
on:
push:
branches:
- main
paths:
- "frontend/**"
- ".github/workflows/frontend-deploy.yaml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-deploy:
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 21
- name: Generate from OpenApi spec
run: npm --prefix ./api install; npm --prefix ./api run generate-ts -y
- name: Install dependencies
run: npm --prefix ./frontend install
- name: Build
run: npm --prefix ./frontend run build
- name: Remove old artifacts
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
password: ${{ secrets.SSH_PASSWORD }}
script: rm -rf /opt/swimlogs/dist/*
- name: Deploy new artifacts
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
password: ${{ secrets.SSH_PASSWORD }}
source: frontend/dist/*
target: /opt/swimlogs/
strip_components: 1