Skip to content

Deploy GUI

Deploy GUI #522

Workflow file for this run

name: Deploy GUI
on:
workflow_dispatch:
push:
branches:
- next
paths:
- 'apps/gui/**'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '22'
- name: Install deps
run: yarn install
- name: Run alpha deploy
run: ./scripts/deploy/gui.sh
- name: Get package version
id: get_version
run: |
VERSION=$(jq -r '.version' ./apps/gui/package.json)
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Prepare Directories
run: |
VERSION=${{ env.VERSION }}
echo "Deploying version $VERSION"
ssh -i ${{ secrets.GUI_SSH_KEY }} -o StrictHostKeyChecking=no ${{ secrets.GUI_HOST_USER }}@${{ secrets.GUI_HOST_IP }} << EOF
set -e
mkdir -p /var/www/${VERSION}
rm -rf /var/www/html/
ln -s /var/www/${VERSION} /var/www/html
EOF
- name: Upload Build
run: |
scp -i ${{ secrets.GUI_SSH_KEY }} -o StrictHostKeyChecking=no -r ./apps/gui/dist/* ${{ secrets.GUI_HOST_USER }}@${{ secrets.GUI_HOST_IP }}:/var/www/html/${{ env.VERSION }}