Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
ffff
  • Loading branch information
TonisSaarjoe committed May 14, 2023
1 parent c15e302 commit ae42610
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,44 @@
name: Node.js CI
name: Deploy to ituk.ee

on:
push:
branches:
- master

jobs:
build:
deploy:
runs-on: self-hosted

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v2

- name: Install dependencies
run: npm ci
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '17'

- name: Decrypt deploy key
run: |
- name: Install dependencies
run: npm install --force


- name: Decrypt deploy key
run: |
openssl aes-256-cbc -K ${{ secrets.DEPLOY_KEY_K }} -iv ${{ secrets.DEPLOY_KEY_IV }} -in deploy_rsa.enc -out deploy_rsa -d
chmod 600 deploy_rsa
eval "$(ssh-agent -s)"
ssh-add deploy_rsa
- name: Build project
run: npm run build
- name: Deploy to remote server
uses: easingthemes/ssh-deploy@v2
with:
- name: Deploy to remote server
uses: easingthemes/ssh-deploy@v2
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
args: -chavzP
local-dir: _work/ituk.ee/*
remote-dir: /var/ituk.ee/build
ssh-host: ${{ secrets.SSH_HOST }}
ssh-username: ${{ secrets.SSH_USERNAME }}

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

0 comments on commit ae42610

Please sign in to comment.