@@ -19,33 +19,49 @@ jobs:
19
19
uses : actions/setup-python@v4
20
20
with :
21
21
python-version : ${{ matrix.python-version }}
22
+ - name : Cache poetry install
23
+ uses : actions/cache@v2
24
+ with :
25
+ path : ~/.local
26
+ key : poetry-1.1.12-0
27
+ - name : Install poetry
28
+ uses : snok/install-poetry@v1
29
+ with :
30
+ virtualenvs-create : true
31
+ virtualenvs-in-project : true
32
+ - name : Cache dependencies
33
+ id : cache-deps
34
+ uses : actions/cache@v2
35
+ with :
36
+ path : .venv
37
+ key : pydeps-${{ hashFiles('**/poetry.lock') }}
22
38
- name : Install Dependencies
23
39
run : |
24
- pip install -r requirements.txt
40
+ poetry install --no-interaction --no-root
41
+ if : steps.cache-deps.outputs.cache-hit != 'true'
25
42
- name : Run Tests
26
43
run : |
27
44
python manage.py test
28
- deploy :
29
- runs-on : ubuntu-latest
30
- needs : build
31
- if : success() && github.ref == 'refs/heads/master'
32
- steps :
33
- - uses : actions/checkout@v4
34
- with :
35
- sparse-checkout : |
36
- scripts/deploy.sh
37
- sparse-checkout-cone-mode : false
38
- - name : Read deploy script contents
39
-
40
- id : deploy_script
41
- with :
42
- path : scripts/deploy.sh
43
- - name : Run deployment script if master branch updated
44
-
45
- with :
46
- host : ${{ secrets.DEPLOY_HOST }}
47
- username : ${{ secrets.DEPLOY_USERNAME }}
48
- key : ${{ secrets.DEPLOY_KEY }}
49
- port : ${{ secrets.DEPLOY_PORT }}
50
- script : ${{ steps.deploy_script.outputs.contents }}
51
-
45
+ # deploy:
46
+ # runs-on: ubuntu-latest
47
+ # needs: build
48
+ # if: success() && github.ref == 'refs/heads/master'
49
+ # steps:
50
+ # - uses: actions/checkout@v4
51
+ # with:
52
+ # sparse-checkout: |
53
+ # scripts/deploy.sh
54
+ # sparse-checkout-cone-mode: false
55
+ # - name: Read deploy script contents
56
+
57
+ # id: deploy_script
58
+ # with:
59
+ # path: scripts/deploy.sh
60
+ # - name: Run deployment script if master branch updated
61
+ # uses: appleboy/[email protected]
62
+ # with:
63
+ # host: ${{ secrets.DEPLOY_HOST }}
64
+ # username: ${{ secrets.DEPLOY_USERNAME }}
65
+ # key: ${{ secrets.DEPLOY_KEY }}
66
+ # port: ${{ secrets.DEPLOY_PORT }}
67
+ # script: ${{ steps.deploy_script.outputs.contents }}
0 commit comments