Skip to content

Update deploy_regru.yml #2

Update deploy_regru.yml

Update deploy_regru.yml #2

Workflow file for this run

name: Deploy to Reg.Ru Hosting
on:
push:
branches: [master]
env:
SERVER_HOST: "31.31.198.56"
USERNAME: "u2970963"
PASSWORD: ${{ secrets.SSH_PASSWORD_REGRU }}
DEPLOY_PATH: /www/otk-help.martinmeer.com
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: |
npm install
- name: Build project
run: |
npm run build
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: dist
path: ./dist
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: dist
- name: Install sshpass
run: sudo apt-get update && sudo apt-get install -y sshpass
- name: Copy files to server
env:
SSH_PASSWORD: ${{ secrets.SSH_PASSWORD_REGRU }}
run: |
sshpass -p $SSH_PASSWORD scp -r dist/* $USERNAME@$SERVER_HOST:$DEPLOY_PATH