forked from creativecommons/ccos-website-source
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (25 loc) · 834 Bytes
/
lektor-build-deploy.yml
File metadata and controls
31 lines (25 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Build and Deploy CC Open Source
on: [push, pull_request]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
# 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 }}