Skip to content

Commit

Permalink
Merge pull request #847 from msusicky/develop
Browse files Browse the repository at this point in the history
2.11.8
  • Loading branch information
msusicky authored Jul 17, 2024
2 parents 052b01c + 8ec0030 commit 7aab98c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/update-data-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,3 @@ jobs:
run: ssh ${SSH_USER_WEB}@${SSH_HOST} -p ${SSH_PORT} -o ServerAliveInterval=120 "cd ${APP_DIR} && source venv/bin/activate && flask compute-metrics all"
- name: Verify data
run: ssh ${SSH_USER_WEB}@${SSH_HOST} -p ${SSH_PORT} "cd ${APP_DIR} && source venv/bin/activate && flask verify-data"
- name: Azure scale down VM
uses: azure/cli@v2
with:
inlineScript: |
az vm deallocate --resource-group ${AZURE_RESOURCE_GROUP} --name ${AZURE_VM_NAME}
az vm resize --resource-group ${AZURE_RESOURCE_GROUP} --name ${AZURE_VM_NAME} --size Standard_B2s
az vm start --resource-group ${AZURE_RESOURCE_GROUP} --name ${AZURE_VM_NAME}
14 changes: 14 additions & 0 deletions .github/workflows/update-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
SSH_KEY: ${{ secrets.SSH_KEY }}
SSH_PORT: ${{ secrets.SSH_PORT }}
SSH_USER_WEB: ${{ secrets.SSH_USER_WEB }}
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}
AZURE_RESOURCE_GROUP: ${{ secrets.AZURE_RESOURCE_GROUP }}
AZURE_VM_NAME: ${{ secrets.AZURE_VM_NAME }}
steps:
- name: Setup SSH key
run: |
Expand All @@ -30,7 +33,18 @@ jobs:
eval `ssh-agent -s`
echo "${SSH_KEY}" | tr -d '\r' | ssh-add -
echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK" >> $GITHUB_ENV
- name: Azure login
uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Check if webserver is running
run: ssh ${SSH_USER_WEB}@${SSH_HOST} -p ${SSH_PORT} "systemctl status ockovani-prd.service"
- name: Create static pages
run: ssh ${SSH_USER_WEB}@${SSH_HOST} -p ${SSH_PORT} "bash ${APP_DIR}/scripts/create_static_pages.sh"
- name: Azure scale down VM
uses: azure/cli@v2
with:
inlineScript: |
az vm deallocate --resource-group ${AZURE_RESOURCE_GROUP} --name ${AZURE_VM_NAME}
az vm resize --resource-group ${AZURE_RESOURCE_GROUP} --name ${AZURE_VM_NAME} --size Standard_B2s
az vm start --resource-group ${AZURE_RESOURCE_GROUP} --name ${AZURE_VM_NAME}

0 comments on commit 7aab98c

Please sign in to comment.