update readme #526
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: 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' | |
cache: 'yarn' | |
- name: Install deps | |
run: yarn | |
- 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 }} |