Skip to content

hapl

hapl #35

Workflow file for this run

name: Node.js CI
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '17' # Adjust to the appropriate Node.js version
- name: Install dependencies
run: npm install --force
- name: Install SSH keys
run: |
mkdir -p ~/.ssh
touch ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
echo "${{ secrets.DEPLOY_RSA }}" > ~/.ssh/id_rsa
ssh-keyscan -H ituk.ee > ~/.ssh/known_hosts
- name: Build
run: npm run build -prod
- name: Deploy
run: rsync -chavzP --rsh="ssh -l deploy" build/* deploy@ituk.ee:/var/ituk.ee/build
- name: Cleanup SSH keys
run: rm ~/.ssh/id_rsa