From b690ca1722154c14342e36963a2fb7669f483395 Mon Sep 17 00:00:00 2001 From: L3D Date: Fri, 7 Feb 2020 01:00:30 +0100 Subject: [PATCH] Update secret var Update lektor-deploy.yml Update lektor-deploy.yml Update lektor-deploy.yml try other caching method try other caching method try other caching method try to improve caching - again try improved caching method? syntax error fixed syntax error fixed syntax error fixed syntax error fixed syntax error fixed syntax error fixed syntax error fixed syntax error fixed Now use the correct syntax! Now use the correct syntax! --- .github/workflows/lektor-check.yml | 17 ++++++++++------ .github/workflows/lektor-deploy.yml | 30 +++++++++++------------------ .gitignore | 3 +++ Makefile | 2 ++ 4 files changed, 27 insertions(+), 25 deletions(-) diff --git a/.github/workflows/lektor-check.yml b/.github/workflows/lektor-check.yml index c540118..5c406f4 100644 --- a/.github/workflows/lektor-check.yml +++ b/.github/workflows/lektor-check.yml @@ -18,17 +18,22 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - - name: Cache lfs data + - name: Cache lfs uses: actions/cache@v1 with: - path: ~/.git + path: ~/.cache/lektor + key: lektorcache + - name: Cache lfs + uses: actions/cache@v1 + with: + path: .git key: lfs - name: install and pull lfs run: | sudo apt-get install git-lfs git lfs pull - - name: check with lektor + - name: install lektor + run: pip install lektor + - name: build with lektor run: | - pip install lektor - # stop the build if there are Python syntax errors or undefined names - lektor build -f scss + lektor build -f scss diff --git a/.github/workflows/lektor-deploy.yml b/.github/workflows/lektor-deploy.yml index abfeefc..35f5823 100644 --- a/.github/workflows/lektor-deploy.yml +++ b/.github/workflows/lektor-deploy.yml @@ -7,7 +7,7 @@ on: # Environment variables available to all jobs and steps in this workflow env: - GKE_PROJECT: ${{ secrets.GKE_PROJECT }} + LEKTOR_DEPLOY_KEY: ${{ secrets.LEKTOR_DEPLOY_KEY }} jobs: build: @@ -29,30 +29,22 @@ jobs: - name: Cache lfs data uses: actions/cache@v1 with: - path: ~/.git - key: | - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - lfs - - name: install git-lfs + path: .git + key: .git/lfs + - name: install git-lfs && lektor run: | sudo apt-get install git-lfs - sudo apt-get autoremove + pip install lektor + - name: Cache lektor .cache + uses: actions/cache@v1 + with: + path: ~/.cache/lektor + key: lektorcache - name: pull lfs data run: git lfs pull - name: build with lektor run: | - pip install lektor - # stop the build if there are Python syntax errors or undefined names - lektor build -f scss + lektor build -f scss - name: deploy new site run: | echo 'c3woc.de ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBC5NslYj+wtriBuKIxJfDRm9E2hnlstWR8durQ6pKvVvP7wjcoXIyAxe41GvJ9SoEhSjF7oVlzlw+zAkzl5WOZ4=' | sudo tee /etc/ssh/ssh_known_hosts diff --git a/.gitignore b/.gitignore index 11d39b3..031b8d0 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,9 @@ Session.vim # auto-generated tag files tags +# lektor +.cache/ + # ---> Windows # Windows thumbnail cache files Thumbs.db diff --git a/Makefile b/Makefile index e0aa3d7..0ab99b8 100644 --- a/Makefile +++ b/Makefile @@ -50,6 +50,7 @@ pull: git pull origin master push: + rm .lfsconfig if git config remote.gitea.url > /dev/null; then git push gitea master else @@ -62,3 +63,4 @@ push: git remote add github git@github.com:c3woc/c3woc-website.git git push github master fi + git restore .lfsconfig