ci: fix use of tox for deploy

This commit is contained in:
Jakob Schnitzer 2021-09-18 12:39:49 +02:00
parent 9a718580f7
commit 78baad4a49
2 changed files with 9 additions and 2 deletions

View File

@ -18,10 +18,11 @@ jobs:
- uses: actions/setup-python@v2 - uses: actions/setup-python@v2
- run: pip install tox - run: pip install tox
- name: Run tox to build site - name: Run tox to build site
if: github.event_name != 'push'
run: tox run: tox
- name: Deploy - name: Run tox to build site and deploy
if: github.event_name == 'push' if: github.event_name == 'push'
env: env:
LEKTOR_DEPLOY_USERNAME: ${{ secrets.LEKTOR_DEPLOY_USERNAME }} LEKTOR_DEPLOY_USERNAME: ${{ secrets.LEKTOR_DEPLOY_USERNAME }}
LEKTOR_DEPLOY_PASSWORD: ${{ secrets.LEKTOR_DEPLOY_PASSWORD }} LEKTOR_DEPLOY_PASSWORD: ${{ secrets.LEKTOR_DEPLOY_PASSWORD }}
run: lektor deploy ghpages run: tox -e deploy

View File

@ -10,3 +10,9 @@ deps =
commands = commands =
lektor plugins reinstall lektor plugins reinstall
lektor build lektor build
[testenv:deploy]
commands =
lektor plugins reinstall
lektor build
lektor deploy ghpages