This repository has been archived on 2023-12-29. You can view files and clone it. You cannot open issues or pull requests or push a commit.
2023-10-19 10:46:59 +02:00
|
|
|
name: Build and push
|
|
|
|
|
run-name: ${{ github.actor }} building dogstats
|
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
|
|
env:
|
|
|
|
|
REGISTRY: gitea.haschek.at
|
|
|
|
|
IMAGE_NAME: $(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
pull-on-server:
|
2023-10-20 20:48:58 +02:00
|
|
|
#if: "contains(github.event.head_commit.message, 'push')"
|
2023-10-19 10:46:59 +02:00
|
|
|
name: Pulling repo on server
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
|
|
|
|
- name: Configure SSH
|
|
|
|
|
env:
|
|
|
|
|
SSH_KEY: ${{ secrets.SSH_KEY }}
|
|
|
|
|
run: |
|
|
|
|
|
mkdir -p ~/.ssh/
|
|
|
|
|
echo "$SSH_KEY" > ~/.ssh/staging.key
|
|
|
|
|
chmod 600 ~/.ssh/staging.key
|
|
|
|
|
- name: Run docker restart on Server
|
|
|
|
|
run: |
|
|
|
|
|
ssh -i ~/.ssh/staging.key -o StrictHostKeyChecking=no -p 22 -o UserKnownHostsFile=/dev/null ${{ secrets.SSH_WEBSERVER_IP }} "cd /var/www/dogstats/ && git pull"
|