99 runs-on : ubuntu-latest
1010 steps :
1111 - uses : actions/checkout@v3
12- - uses : actions/setup-python@v3
12+ - uses : actions/setup-python@v4
1313 with :
14- python-version : " 3.10"
14+ python-version-file : pyproject.toml
15+ cache : ' poetry'
1516 - uses : Gr1n/setup-poetry@v8
1617 with :
1718 poetry-version : ' 1.1.12'
1819 - run : pip install tox
19- - run : tox -e lint,py310-dj40
20+ - run : tox -e lint,py311-dj42
2021 test_compatibility :
2122 needs : test
2223 runs-on : ubuntu-latest
@@ -37,16 +38,16 @@ jobs:
3738 toxenv : py310-dj32,py310-dj41,py310-dj42,py310-djmain
3839 - python : " 3.11"
3940 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"
4444 # toxenv: py312-dj41
4545 steps :
4646 - uses : actions/checkout@v3
47- - uses : actions/setup-python@v3
47+ - uses : actions/setup-python@v4
4848 with :
4949 python-version : ${{ matrix.python }}
50+ allow-prereleases : true
5051 - uses : Gr1n/setup-poetry@v8
5152 with :
5253 poetry-version : ' 1.1.12'
@@ -65,24 +66,19 @@ jobs:
6566 - id : node-cache
6667 uses : actions/cache@v2
6768 with :
69+ # Cache node_modules rather than the npm cache, as we rarely update npm packages.
6870 path : node_modules
6971 key : ${{ runner.os }}-node-${{ hashFiles('**/.nvmrc') }}-${{ hashFiles('**/package-lock.json') }}
7072 - if : steps.node-cache.outputs.cache-hit != 'true'
7173 run : npm ci --no-audit
7274 - run : npm run build
73- - uses : actions/setup-python@v3
75+ - uses : actions/setup-python@v4
7476 with :
75- python-version : " 3.10"
77+ python-version-file : pyproject.toml
78+ cache : ' poetry'
7679 - uses : Gr1n/setup-poetry@v8
7780 with :
7881 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
8682 - run : poetry install
8783 - run : poetry run django-admin runserver --settings=tests.settings.production --pythonpath=. &
8884 # Docs website build.
@@ -98,20 +94,16 @@ jobs:
9894 - run : cat pyproject.toml | awk '{sub(/^version = .+/,"version = \"0.0.0.dev\"")}1' > pyproject.toml.tmp && mv pyproject.toml.tmp pyproject.toml
9995 - run : poetry build
10096 - run : mv dist site
101- - uses : actions/upload-artifact@v3
97+ - uses : actions/configure-pages@v3
98+ - uses : actions/upload-pages-artifact@v2
10299 with :
103- name : site
104100 path : site
105- retention-days : 1
106101 deploy_site :
107- runs-on : ubuntu-latest
108102 needs : build_site
103+ runs-on : ubuntu-latest
104+ environment :
105+ name : github-pages
106+ url : ${{ steps.deployment.outputs.page_url }}
109107 if : github.event_name == 'push' && github.ref == 'refs/heads/main'
110108 steps :
111- - uses : actions/checkout@v3
112- - uses : actions/download-artifact@v3
113- - uses : JamesIves/github-pages-deploy-action@v4.3.3
114- with :
115- branch : gh-pages
116- folder : site
117- clean : true
109+ - uses : actions/deploy-pages@v2
0 commit comments