Skip to content

Instantly share code, notes, and snippets.

@mehmetron
Created July 23, 2021 20:51
Show Gist options
  • Save mehmetron/4e1e7910505f9f8fec6b971176b3407c to your computer and use it in GitHub Desktop.
Save mehmetron/4e1e7910505f9f8fec6b971176b3407c to your computer and use it in GitHub Desktop.
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
CD:
name: Continous Delivery
runs-on: ubuntu-latest
steps:
- name: SSH into production server
uses: appleboy/ssh-action@master
with:
host: ipaddress
username: root
key: ${{secrets.CD_SK}}
port: 22
script: |
cd frontend
git pull
yarn build
yarn start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment