Skip to content

Update main.yml

Update main.yml #24

Workflow file for this run

name: Node.js CI
on:
push:
branches:
- master
env:
SSH_USERNAME: ${{ secrets.SSH_USERNAME }}
jobs:
build:
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '17'
- name: Install dependencies
run: npm install --force
- name: Decrypt deploy key
uses: webfactory/ssh-agent@v0.4.1
with:
ssh-private-key: ${{ secrets.DEPLOY_RSA }}
- name: Build
run: npm run build -prod
- name: Deploy
run: rsync -chavzP --rsh="ssh -l ${{ secrets.SSH_USERNAME }}" build/* ${{ secrets.SSH_USERNAME }}@ituk.ee:/var/ituk.ee/build