Create main.yml
This commit is contained in:
20
.github/workflows/main.yml
vendored
Normal file
20
.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
name: Docker Image CI for GHCR
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
jobs:
|
||||||
|
ssh-login-and-publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Setup SSH Keys and known_hosts
|
||||||
|
run: |
|
||||||
|
install -m 600 -D /dev/null ~/.ssh/id_rsa
|
||||||
|
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
||||||
|
ssh-keyscan -H ${{ secrets.SERVER_HOST }} > ~/.ssh/known_hosts
|
||||||
|
|
||||||
|
- name: connect and pull
|
||||||
|
run: |
|
||||||
|
ssh ${{ secrets.SERVER_USERNAME }}@${{ secrets.SERVER_HOST }} "cd repositories/idp && git pull && cd idp && npm i && npm run build // cd ../idp_client && npm i && npm run build // pm2 restart 3"
|
||||||
Reference in New Issue
Block a user