Skip to content

Instantly share code, notes, and snippets.

@hasanparasteh
Created May 9, 2021 06:56
Show Gist options
  • Save hasanparasteh/4c9a79ad1fa4d11969a6159dc839dc5f to your computer and use it in GitHub Desktop.
Save hasanparasteh/4c9a79ad1fa4d11969a6159dc839dc5f to your computer and use it in GitHub Desktop.
Build project and moves it into server via SCP
name: CI
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Dependencies 📦
run: npm install
- name: Building 🏗️
run: npm run build
- name: Moves production 🧘
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
passphrase: ${{ secrets.PASSWORD }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
source: "dist/*"
target: "/home/user/public_html"
overwrite: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment