Skip to content

feat: update deploy to vps with homemade script #9

feat: update deploy to vps with homemade script

feat: update deploy to vps with homemade script #9

Workflow file for this run

name: Publish
on:
release:
types: [created]
jobs:
if: !github.event.prerelease

Check failure on line 8 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish.yml

Invalid workflow file

You have an error in your yaml syntax on line 8
deploy:
runs-on: ubuntu-latest
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 }}