9
9
runs-on : ubuntu-latest
10
10
steps :
11
11
- uses : actions/checkout@v3
12
- - uses : actions/setup-python@v3
12
+ - uses : actions/setup-python@v4
13
13
with :
14
- python-version : " 3.10"
14
+ python-version-file : pyproject.toml
15
+ cache : ' poetry'
15
16
- uses : Gr1n/setup-poetry@v8
16
17
with :
17
18
poetry-version : ' 1.1.12'
18
19
- run : pip install tox
19
- - run : tox -e lint,py310-dj40
20
+ - run : tox -e lint,py311-dj42
20
21
test_compatibility :
21
22
needs : test
22
23
runs-on : ubuntu-latest
@@ -37,16 +38,16 @@ jobs:
37
38
toxenv : py310-dj32,py310-dj41,py310-dj42,py310-djmain
38
39
- python : " 3.11"
39
40
toxenv : py311-dj41,py311-dj42,py311-djmain
40
- # Tentative support for next Python pre-release. For the correct specifier,
41
- # Check: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json.
42
- # when django supports py312, then uncomment this
43
- # - python: "3.12.0-alpha.6"
41
+ # Tentative support for next Python pre-release.
42
+ # When django supports the version, uncomment this
43
+ # - python: "3.12"
44
44
# toxenv: py312-dj41
45
45
steps :
46
46
- uses : actions/checkout@v3
47
- - uses : actions/setup-python@v3
47
+ - uses : actions/setup-python@v4
48
48
with :
49
49
python-version : ${{ matrix.python }}
50
+ allow-prereleases : true
50
51
- uses : Gr1n/setup-poetry@v8
51
52
with :
52
53
poetry-version : ' 1.1.12'
@@ -65,24 +66,19 @@ jobs:
65
66
- id : node-cache
66
67
uses : actions/cache@v2
67
68
with :
69
+ # Cache node_modules rather than the npm cache, as we rarely update npm packages.
68
70
path : node_modules
69
71
key : ${{ runner.os }}-node-${{ hashFiles('**/.nvmrc') }}-${{ hashFiles('**/package-lock.json') }}
70
72
- if : steps.node-cache.outputs.cache-hit != 'true'
71
73
run : npm ci --no-audit
72
74
- run : npm run build
73
- - uses : actions/setup-python@v3
75
+ - uses : actions/setup-python@v4
74
76
with :
75
- python-version : " 3.10"
77
+ python-version-file : pyproject.toml
78
+ cache : ' poetry'
76
79
- uses : Gr1n/setup-poetry@v8
77
80
with :
78
81
poetry-version : ' 1.1.12'
79
- - uses : actions/cache@v3
80
- with :
81
- path : ~/.cache/pip
82
- key : ${{ runner.os }}-python-py310-${{ hashFiles('**/pyproject.toml') }}
83
- restore-keys : |
84
- ${{ runner.os }}-python-py310-
85
- - run : poetry config virtualenvs.create false
86
82
- run : poetry install
87
83
- run : poetry run django-admin runserver --settings=tests.settings.production --pythonpath=. &
88
84
# Docs website build.
@@ -98,20 +94,16 @@ jobs:
98
94
- run : cat pyproject.toml | awk '{sub(/^version = .+/,"version = \"0.0.0.dev\"")}1' > pyproject.toml.tmp && mv pyproject.toml.tmp pyproject.toml
99
95
- run : poetry build
100
96
- run : mv dist site
101
- - uses : actions/upload-artifact@v3
97
+ - uses : actions/configure-pages@v3
98
+ - uses : actions/upload-pages-artifact@v2
102
99
with :
103
- name : site
104
100
path : site
105
- retention-days : 1
106
101
deploy_site :
107
- runs-on : ubuntu-latest
108
102
needs : build_site
103
+ runs-on : ubuntu-latest
104
+ environment :
105
+ name : github-pages
106
+ url : ${{ steps.deployment.outputs.page_url }}
109
107
if : github.event_name == 'push' && github.ref == 'refs/heads/main'
110
108
steps :
111
- - uses : actions/checkout@v3
112
- - uses : actions/download-artifact@v3
113
- -
uses :
JamesIves/[email protected]
114
- with :
115
- branch : gh-pages
116
- folder : site
117
- clean : true
109
+ - uses : actions/deploy-pages@v2
0 commit comments