test static #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update application on remote server | |
on: [push] | |
jobs: | |
update: | |
name: Update Application | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
- name: Copy script to remote server | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.SERVER_HOST }} | |
username: ${{ secrets.SERVER_USERNAME }} | |
password: ${{ secrets.SERVER_PASSWORD }} | |
port: ${{ secrets.SERVER_PORT }} | |
strip_components: 2 | |
source: '.github/scripts/update_app.sh' | |
target: '/home/${{ secrets.SERVER_USERNAME }}/scripts' | |
overwrite: true | |
- name: Updating Application | |
uses: appleboy/[email protected] | |
env: | |
APP_NAME: 'timeseries_viewer' | |
APP_PATH: '/home/${{ secrets.SERVER_USERNAME }}/apps/timeseries_viewer' | |
CONDA_EXECUTABLE: '/home/${{ secrets.SERVER_USERNAME }}/miniconda3/bin/conda' | |
APP_STATIC_FILES_PATH: '/home/${{ secrets.SERVER_USERNAME }}/apps/timeseries_viewer/tethysapp/timeseries_viewer/public' | |
with: | |
host: ${{ secrets.SERVER_HOST }} | |
username: ${{ secrets.SERVER_USERNAME }} | |
password: ${{ secrets.SERVER_PASSWORD }} | |
port: ${{ secrets.SERVER_PORT }} | |
envs: APP_NAME,APP_PATH,APP_STATIC_FILES_PATH,CONDA_EXECUTABLE | |
script: | | |
echo "APP_NAME=$APP_NAME" | |
echo "APP_PATH=$APP_PATH" | |
echo "CONDA_EXECUTABLE=$CONDA_EXECUTABLE" | |
echo "APP_STATIC_FILES_PATH=$APP_STATIC_FILES_PATH" | |
chmod +x $HOME/update_app.sh | |
# Pass arguments explicitly and log them | |
$HOME/scripts/update_app.sh \ | |
"$APP_NAME" \ | |
"$APP_PATH" \ | |
"$CONDA_EXECUTABLE" \ | |
"$APP_STATIC_FILES_PATH" \ | |
--skip-syncstores |