Skip to content

Publish

Publish #10

Workflow file for this run

name: Publish
on:
release:
types: [created]
jobs:
deploy:
runs-on: ubuntu-latest
if: github.event.release.prerelease == false
steps:
- uses: actions/checkout@v4
- name: Install SSH client
run: sudo apt-get install -y openssh-client
- uses: actions/setup-node@v4
with:
node-version: 16.x
- name: Install dependencies and build
run: |
npm install
npm run build
- name: Print SSH Key to File
run: echo "${{ secrets.VPS_SSH_KEY }}" > ssh_key
- name: Deploy to VPS
run: |
scp -o StrictHostKeyChecking=no -i ssh_key -r dist/* ${{ secrets.VPS_USERNAME }}@${{ secrets.VPS_HOST }}:${{ secrets.VPS_PROJECT_FOLDER }}