Skip to content

Instantly share code, notes, and snippets.

@malikperang
Created March 3, 2021 05:33
Show Gist options
  • Save malikperang/cf3b7481cd512e4f73ea02e70fee3db4 to your computer and use it in GitHub Desktop.
Save malikperang/cf3b7481cd512e4f73ea02e70fee3db4 to your computer and use it in GitHub Desktop.
Contoh Github Action
name: CICD
on: [push,pull_request]
jobs:
push:
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
############################
#
# Checkout source
#
############################
- uses: actions/checkout@v2
##########################################
#
# Update source code on farizizwan.com server
#
##########################################
- name: Git pull
uses: fifsky/ssh-action@master
with:
command: |
cd /public_html/ && git pull origin master
host: ${{ secrets.HOST }}
user: ${{ secrets.USER }}
key: ${{ secrets.PRIVATE_KEY }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment