diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2e7ea6ee..217e86ca 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -20,27 +20,18 @@ jobs: DEPLOY: ${{ github.event_name != 'pull_request' }} steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/setup-python@v2 - - name: Install tox + - name: Install Lektor run: | python -m pip install --upgrade pip setuptools - python -m pip install tox + python -m pip install lektor - - run: echo DEPLOY='${{ env.DEPLOY }}' - - name: Run tox to build site - if: env.DEPLOY != 'true' - run: tox + - run: lektor build - - name: Add flow.srv.pocoo.org to ~/.ssh/known_hosts - if: env.DEPLOY == 'true' - run: | - mkdir -p ~/.ssh/ - echo "flow.srv.pocoo.org ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8X1nZnXChssjRoUMXWwz3IskVFaGvD9sRIMvlkU8RbLMqfp0kT+/hhi/c1xVv+wdGCrPTuFSs9X2RzdNsWSwaUqoeSh80BsfQRso3hSPd2Z+PNplHGuBt/29MwX2l+j1lWB7D2VFb7R1HGxwgmccef75JepVse7fCjVP3KvjIJ4nae0k9aHhcKLVUlRl+Ut+8pWCGE1wdoMEwpeio8DeBX7YWE1vX5DhAd0U+nga2xRAuWbQ5sD1LJQ1fmZoTBUKsVioQmuvrUQKSofwolwBgQtDqgcWLyeKfWn11aG6rMD3ZJHX0ltM91Gbynu10+xN5i7j6TdNQyE9CfO+Xz7Gv" > ~/.ssh/known_hosts - - name: Run tox to build site and deploy + - run: lektor deploy ghpages-https if: env.DEPLOY == 'true' env: - LEKTOR_DEPLOY_USERNAME: ${{ secrets.LEKTOR_DEPLOY_USERNAME }} - LEKTOR_DEPLOY_PASSWORD: ${{ secrets.LEKTOR_DEPLOY_PASSWORD }} - run: tox -e deploy + LEKTOR_DEPLOY_USERNAME: lektor + LEKTOR_DEPLOY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} diff --git a/Website.lektorproject b/Website.lektorproject index b6b1818b..22a61025 100644 --- a/Website.lektorproject +++ b/Website.lektorproject @@ -3,17 +3,18 @@ name = Lektor url = https://www.getlektor.com/ url_style = relative -[servers.production] -enabled = yes -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 +target = ghpages://lektor/lektor-website +default = yes + +[servers.ghpages-https] +enabled = yes +name = Github pages on repo +target = ghpages+https://lektor/lektor-website +default = not + [packages] lektor-webpack-support = 0.3 diff --git a/tox.ini b/tox.ini index f20212a9..58f0faaa 100644 --- a/tox.ini +++ b/tox.ini @@ -10,9 +10,3 @@ deps = commands = lektor plugins reinstall lektor build - -[testenv:deploy] -commands = - lektor plugins reinstall - lektor build - lektor deploy production