Skip to content

Commit

Permalink
Merge pull request #776 from creativecommons/update-python-and-workflow
Browse files Browse the repository at this point in the history
Update Python, GitHub Actions workflow, and README
  • Loading branch information
TimidRobot authored Apr 8, 2024
2 parents 4271783 + 6899abc commit 5ea10a3
Show file tree
Hide file tree
Showing 4 changed files with 169 additions and 191 deletions.
39 changes: 25 additions & 14 deletions .github/workflows/lektor-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,28 @@ jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: setup python version
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Install dependencies
run: |
pip install pipenv
pipenv sync
pipenv run lektor build -f webpack
- name: Deploy to production
if: github.ref == 'refs/heads/main'
run: |
pipenv run lektor deploy ghpages --username ${{ secrets.LEKTOR_DEPLOY_USERNAME }} --password ${{ secrets.LEKTOR_DEPLOY_PASSWORD }}

# https://github.com/actions/setup-python
- name: setup python version
uses: actions/setup-python@v5
with:
python-version: 3.11

- name: Install pipenv
run: |
pip install --upgrade pip
pip install pipenv
# https://github.com/actions/checkout
- uses: actions/checkout@v4

- name: Install dependencies
run: pipenv sync

- name: Build static site and use webpack
run: pipenv run lektor build -f webpack

- name: Deploy to production
if: github.ref == 'refs/heads/main'
run: |
pipenv run lektor deploy ghpages --username ${{ secrets.LEKTOR_DEPLOY_USERNAME }} --password ${{ secrets.LEKTOR_DEPLOY_PASSWORD }}
6 changes: 3 additions & 3 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ url = "https://pypi.org/simple"
verify_ssl = true

[packages]
black = "*"
black = ">=24.3.0"
flake8 = "*"
isort = "*"
lektor = "*"
lektor = ">=3.3.11"

[requires]
python_version = "3.9"
python_version = "3.11"
Loading

0 comments on commit 5ea10a3

Please sign in to comment.