38 lines
798 B
YAML
38 lines
798 B
YAML
name: "Deploy site"
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- '*'
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
workflow_dispatch:
|
|
# Allow manually running workflow
|
|
schedule:
|
|
- cron: '23 2 * * *'
|
|
|
|
jobs:
|
|
deploy-lektor-website:
|
|
name: Deploy lektor website
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
DEPLOY: ${{ github.event_name != 'pull_request' }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-python@v2
|
|
|
|
- name: Install Lektor
|
|
run: |
|
|
python -m pip install --upgrade pip setuptools
|
|
python -m pip install lektor
|
|
|
|
- run: lektor build
|
|
|
|
- run: lektor deploy ghpages-https
|
|
if: env.DEPLOY == 'true'
|
|
env:
|
|
LEKTOR_DEPLOY_USERNAME: lektor
|
|
LEKTOR_DEPLOY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
|