Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ituk-ttu/ituk.ee
Browse files Browse the repository at this point in the history
  • Loading branch information
Tõnis Saarjõe committed May 14, 2023
2 parents 969371e + 9f3514c commit 0e8e684
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build and Deploy

on:
push:
branches:
- master

jobs:
build-and-deploy:
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 private key
uses: webfactory/ssh-agent@v0.4.0
with:
ssh-private-key: ${{ secrets.DEPLOY_SSH_KEY }}
ssh-keyname: deploy_rsa

- name: Build project
run: npm run build -prod

- name: Deploy
run: rsync -chavzP --rsh="ssh -l ${{ secrets.SSH_USERNAME }}" _work/ituk.ee/* ${{ secrets.SSH_USERNAME }}@ituk.ee:/var/ituk.ee/build

0 comments on commit 0e8e684

Please sign in to comment.