β¨ Add fronted template #17
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: Backend CI/CD | |
on: | |
push: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
backend-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: π Get latest code | |
uses: actions/checkout@v4 | |
- name: β¬οΈ Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.12" | |
- name: β¬οΈ Install dependencies | |
working-directory: ./backend | |
run: | | |
make dev-deps | |
- name: π¨ Lint | |
working-directory: ./backend | |
run: | | |
make lint | |
backend-test: | |
runs-on: ubuntu-latest | |
needs: [backend-lint] | |
steps: | |
- name: π Get latest code | |
uses: actions/checkout@v4 | |
- name: β¬οΈ Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.12" | |
- name: β¬οΈ Install dependencies | |
working-directory: ./backend | |
run: | | |
make dev-deps | |
- name: π¨ Test | |
working-directory: ./backend | |
run: | | |
make lint | |
backend-deploy: | |
name: deploy | |
needs: [backend-test] | |
runs-on: ubuntu-latest | |
steps: | |
- name: π Get latest code | |
uses: actions/checkout@v3 | |
# - name: π Deploy | |
# uses: appleboy/ssh-action@v1.0.0 | |
# with: | |
# host: ${{ secrets.HOST }} | |
# username: ${{ secrets.USERNAME }} | |
# key: ${{ secrets.KEY }} | |
# port: ${{ secrets.PORT }} | |
# script: | | |
# cd /home/beaver/FEFU-queries | |
# git pull | |
# echo "WIP" |