From 78baad4a49e7855a5a884d7926518e22a1418f64 Mon Sep 17 00:00:00 2001 From: Jakob Schnitzer Date: Sat, 18 Sep 2021 12:39:49 +0200 Subject: [PATCH] ci: fix use of tox for deploy --- .github/workflows/deploy.yml | 5 +++-- tox.ini | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 34131481..ae9b669a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -18,10 +18,11 @@ jobs: - uses: actions/setup-python@v2 - run: pip install tox - name: Run tox to build site + if: github.event_name != 'push' run: tox - - name: Deploy + - name: Run tox to build site and deploy if: github.event_name == 'push' env: LEKTOR_DEPLOY_USERNAME: ${{ secrets.LEKTOR_DEPLOY_USERNAME }} LEKTOR_DEPLOY_PASSWORD: ${{ secrets.LEKTOR_DEPLOY_PASSWORD }} - run: lektor deploy ghpages + run: tox -e deploy diff --git a/tox.ini b/tox.ini index 58f0faaa..0d81a695 100644 --- a/tox.ini +++ b/tox.ini @@ -10,3 +10,9 @@ deps = commands = lektor plugins reinstall lektor build + +[testenv:deploy] +commands = + lektor plugins reinstall + lektor build + lektor deploy ghpages