Skip to content

Update main.yml

Update main.yml #4

Workflow file for this run

name: Deploy Farad
on:
push:
branches:
- production
jobs:
deploy:
runs-on: ubuntu-latest
container:
image: node:20-alpine
steps:
- run: npm ci
- run: npm run build
- name: Get SSH key and set permissions
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
- name: Deploy using SCP
- run: scp -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa -r ./dist/* ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/test