Merge pull request #302 from lektor/enh/gh-action-deploy

PR: Add deploy with github action
This commit is contained in:
Jakob Schnitzer 2021-09-18 12:29:08 +02:00 committed by GitHub
commit 98ed6a5f4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 48 additions and 31 deletions

27
.github/workflows/deploy.yml vendored Normal file
View File

@ -0,0 +1,27 @@
name: "Deploy site"
on:
pull_request:
branches:
- '*'
push:
branches:
- 'master'
jobs:
deploy-lektor-website:
name: Deploy lektor website
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/setup-python@v2
- run: pip install tox
- name: Run tox to build site
run: tox
- name: Deploy
if: github.event == 'push'
env:
LEKTOR_DEPLOY_USERNAME: ${{ secrets.LEKTOR_DEPLOY_USERNAME }}
LEKTOR_DEPLOY_PASSWORD: ${{ secrets.LEKTOR_DEPLOY_PASSWORD }}
run: lektor deploy ghpages

1
.gitignore vendored
View File

@ -2,6 +2,7 @@
*.pyc
*.egg-info
.cache
.tox
packages/*/build
packages/*/dist
webpack/node_modules

View File

@ -1,29 +0,0 @@
language: python
python: 3.7
env: TRAVIS_NODE_VERSION=10
dist: xenial
sudo: true
branches:
only:
- master
install:
- "pip install -U pip"
- "pip install git+https://github.com/lektor/lektor#egg=Lektor"
script:
- "lektor build"
cache:
directories:
- $HOME/.cache/pip
- $HOME/.cache/lektor/builds
deploy:
provider: script
script: lektor deploy production
on:
branch: master
addons:
ssh_known_hosts: flow.srv.pocoo.org
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/f0c538cdfc9883f81e34

View File

@ -1,7 +1,7 @@
[project]
name = Lektor
url = https://www.getlektor.com/
url_style = absolute
url_style = relative
[servers.production]
enabled = yes
@ -9,12 +9,18 @@ name = Production
target = rsync://deploy@flow.srv.pocoo.org/srv/websites/getlektor.com/static
default = yes
[servers.ghpages]
enabled = yes
name = Github pages on repo
target = ghpages+https://lektor/_deployed-lektor-website
default = no
[packages]
lektor-webpack-support = 0.3
lektor-disqus-comments = 0.1
lektor-markdown-header-anchors = 0.1
lektor-markdown-highlighter = 0.1
lektor-markdown-admonition = 0.1
lektor-atom = 0.3.1
lektor-atom = 0.4.0
lektor-tags = 0.3
lektor-slugify = 0.4

12
tox.ini Normal file
View File

@ -0,0 +1,12 @@
[tox]
minversion = 3
envlist = py
skipsdist = true
[testenv]
deps =
lektor
jinja2>=3
commands =
lektor plugins reinstall
lektor build