Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Merge pull request #7 from wwi21seb-projekt/Iteration_3 #11

Merge pull request #7 from wwi21seb-projekt/Iteration_3

Merge pull request #7 from wwi21seb-projekt/Iteration_3 #11

name: Update Mock Client for Server Beta
on:
push:
branches:
- main
jobs:
push:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SERVER_SSH_PRIVATE }}" > ~/.ssh/id_rsa
echo "${{ secrets.SERVER_SSH_PUBLIC }}" > ~/.ssh/id_rsa.pub
chmod 600 ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa.pub
ssh-keyscan -H ${{ secrets.SERVER_HOST }} >> ~/.ssh/known_hosts
- name: Copy files to server
run: |
# Remove existing files in the target directory
ssh ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} 'rm -rf ${{ secrets.SERVER_DIRECTORY }}/*'
# Copy new files from src to the target directory
scp -r src/* ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }}:${{ secrets.SERVER_DIRECTORY }}
- name: Change API URL
run: ssh ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} '/home/update_api_url.sh'