From b4085737b6ee83af164157e86c090b931205f16f Mon Sep 17 00:00:00 2001 From: goanpeca Date: Wed, 6 May 2020 20:50:42 -0500 Subject: [PATCH 1/2] Use github actions to deploy lektor site --- .github/workflows/deploy.yml | 27 +++++++++++++++++++++++++++ .gitignore | 1 + .travis.yml | 2 ++ Website.lektorproject | 10 ++++++++-- tox.ini | 12 ++++++++++++ 5 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/deploy.yml create mode 100644 tox.ini diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..b772a8a6 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -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 diff --git a/.gitignore b/.gitignore index 9c72ae93..e9a6047e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.pyc *.egg-info .cache +.tox packages/*/build packages/*/dist webpack/node_modules diff --git a/.travis.yml b/.travis.yml index f0c45024..8145b2e8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,9 @@ branches: - master install: - "pip install -U pip" + - "pip install "werkzeug<1.0" - "pip install git+https://github.com/lektor/lektor#egg=Lektor" + - "pip install "werkzeug<1.0" script: - "lektor build" cache: diff --git a/Website.lektorproject b/Website.lektorproject index 6c9bac9a..b6b1818b 100644 --- a/Website.lektorproject +++ b/Website.lektorproject @@ -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 diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..58f0faaa --- /dev/null +++ b/tox.ini @@ -0,0 +1,12 @@ +[tox] +minversion = 3 +envlist = py +skipsdist = true + +[testenv] +deps = + lektor + jinja2>=3 +commands = + lektor plugins reinstall + lektor build From be187dc5cc9cda36449a0bea56ef0edaea9b67de Mon Sep 17 00:00:00 2001 From: Jakob Schnitzer Date: Sat, 18 Sep 2021 12:27:28 +0200 Subject: [PATCH 2/2] ci: remove .travis.yml --- .travis.yml | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8145b2e8..00000000 --- a/.travis.yml +++ /dev/null @@ -1,31 +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 "werkzeug<1.0" - - "pip install git+https://github.com/lektor/lektor#egg=Lektor" - - "pip install "werkzeug<1.0" -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