Skip to content

Commit 5ea10a3

Browse files
authored
Merge pull request creativecommons#776 from creativecommons/update-python-and-workflow
Update Python, GitHub Actions workflow, and README
2 parents 4271783 + 6899abc commit 5ea10a3

File tree

4 files changed

+169
-191
lines changed

4 files changed

+169
-191
lines changed

.github/workflows/lektor-build-deploy.yml

+25-14
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,28 @@ jobs:
44
build-and-deploy:
55
runs-on: ubuntu-latest
66
steps:
7-
- uses: actions/checkout@v2
8-
- name: setup python version
9-
uses: actions/setup-python@v3
10-
with:
11-
python-version: 3.9
12-
- name: Install dependencies
13-
run: |
14-
pip install pipenv
15-
pipenv sync
16-
pipenv run lektor build -f webpack
17-
- name: Deploy to production
18-
if: github.ref == 'refs/heads/main'
19-
run: |
20-
pipenv run lektor deploy ghpages --username ${{ secrets.LEKTOR_DEPLOY_USERNAME }} --password ${{ secrets.LEKTOR_DEPLOY_PASSWORD }}
7+
8+
# https://github.com/actions/setup-python
9+
- name: setup python version
10+
uses: actions/setup-python@v5
11+
with:
12+
python-version: 3.11
13+
14+
- name: Install pipenv
15+
run: |
16+
pip install --upgrade pip
17+
pip install pipenv
18+
19+
# https://github.com/actions/checkout
20+
- uses: actions/checkout@v4
21+
22+
- name: Install dependencies
23+
run: pipenv sync
24+
25+
- name: Build static site and use webpack
26+
run: pipenv run lektor build -f webpack
27+
28+
- name: Deploy to production
29+
if: github.ref == 'refs/heads/main'
30+
run: |
31+
pipenv run lektor deploy ghpages --username ${{ secrets.LEKTOR_DEPLOY_USERNAME }} --password ${{ secrets.LEKTOR_DEPLOY_PASSWORD }}

Pipfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ url = "https://pypi.org/simple"
44
verify_ssl = true
55

66
[packages]
7-
black = "*"
7+
black = ">=24.3.0"
88
flake8 = "*"
99
isort = "*"
10-
lektor = "*"
10+
lektor = ">=3.3.11"
1111

1212
[requires]
13-
python_version = "3.9"
13+
python_version = "3.11"

0 commit comments

Comments
 (0)