Files
idp/.github/workflows/main.yml
Bastian Wagner d90c119993 update workflow
2024-09-08 13:06:37 +02:00

21 lines
722 B
YAML

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"