Skip to content

Commit

Permalink
Fix server deploy (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
nquetschlich authored Feb 24, 2023
1 parent 6c65bea commit c5cab40
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 42 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
KNOWN_HOSTS: ${{ secrets.KNOWN_HOSTS }}
CDA_HOST_NAME: tueicda-cda.srv.mwn.de
CDA_USER_NAME: web-user
CDA_TARGET_DIR: /var/www/cda/app/mqtbench/

jobs:
build_wheel:
name: Build wheel
Expand Down Expand Up @@ -77,3 +84,23 @@ jobs:
password: ${{ secrets.pypi_password }}
skip_existing: true
verbose: true

upload_webserver:
needs: upload_pypi
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- name: Create version file
run: |
echo "version = \"$(git describe --tags --always)\"" > mqtbench_version.txt
- name: Setup SSH via the stored Action Secrets
run: |
mkdir -p ~/.ssh
echo "${KNOWN_HOSTS}" >> ~/.ssh/known_hosts
echo "${DEPLOY_KEY}" > ~/.ssh/my_rsync_key
echo "IdentityFile ~/.ssh/my_rsync_key" >> ~/.ssh/config
chmod -R 700 ~/.ssh
- name: Copy version file to the webserver
working-directory: ${{ github.workspace }}
run: |
rsync -avz -e ssh mqtbench_version.txt ${CDA_USER_NAME}@${CDA_HOST_NAME}:${CDA_TARGET_DIR}/mqtbench_version.txt
42 changes: 0 additions & 42 deletions .github/workflows/server_deploy.yml

This file was deleted.

0 comments on commit c5cab40

Please sign in to comment.