Update of readme file representing the changes made to the server env… #26
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: Deploy to Server | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
environment: Infomaniak | |
env: | |
DEPLOY_PATH: ${{ secrets.DEPLOY_PATH }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up SSH | |
run: | | |
mkdir -p ~/.ssh | |
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa | |
ssh-keyscan -H "${{ secrets.SERVER_HOST }}" >> ~/.ssh/known_hosts | |
- name: Deploy code to server | |
run: | | |
ssh ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} "cd ${DEPLOY_PATH:-TEST}; | |
git checkout main; | |
git pull origin; | |
mkdir bin; | |
mkdir data; | |
mkdir debug; | |
mkdir log; | |
php vatsim.php?r=vatsim-status; | |
php vatsim.php?r=vatsim-data; | |
php vatsim.php?r=vatspy-data; | |
php rangecollect.php;" | |