switch lat and lng #61
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Python application | |
on: push | |
env: | |
PYTHON_VERSION: "3.12" | |
permissions: | |
contents: read | |
jobs: | |
CI: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install poetry | |
run: pipx install poetry | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
cache: "poetry" | |
- name: Install dependencies | |
run: poetry install --with dev | |
- name: Lint | |
run: poetry run scons lint | |
- name: Lock | |
run: poetry run scons lock | |
- name: Type | |
run: poetry run scons type | |
- name: Test | |
run: poetry run scons test | |
- name: Sec | |
run: poetry run scons sec | |
CD: | |
runs-on: ubuntu-latest | |
needs: CI | |
if: github.ref == 'refs/heads/main' # expression strings must be single quoted | |
steps: | |
- name: Deploy app | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USERNAME }} | |
key: ${{ secrets.SSH_KEY }} | |
script_stop: true | |
script: | | |
source $HOME/.profile | |
cd ${{ secrets.SSH_WORKDIR }} | |
git pull origin main | |
poetry install | |
systemctl --user restart aid-collect | |
systemctl --user restart aid-provide |