Skip to content

Use PDM to manage dependencies and build site #752

Use PDM to manage dependencies and build site

Use PDM to manage dependencies and build site #752

Workflow file for this run

name: "Deploy site"
on:
pull_request:
branches:
- "*"
push:
branches:
- "master"
workflow_dispatch:
# Allow manually running workflow
schedule:
- cron: "23 2 * * *"
env:
DEPLOY: >-
${{
github.event_name != 'pull_request'
&&
github.ref == 'refs/heads/master'
}}
jobs:
build:
name: Build lektor website
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pdm-project/setup-pdm@v3
with:
python-version: "3.10"
cache: true
- uses: actions/setup-node@v3
with:
node-version: "lts/*"
cache: npm
cache-dependency-path: webpack/package-lock.json
- run: pdm install
- run: pdm run build
- name: Check for broken internal links
uses: untitaker/hyperlink@0.1.29
with:
args: '--check-anchors _htdocs'
- name: Deploy lektor website
if: env.DEPLOY == 'true'
run: pdm run deploy
env:
LEKTOR_DEPLOY_USERNAME: lektor
LEKTOR_DEPLOY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}