From afb88e2b690c5b3c8eac5f788518d7a16950204f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Michonneau?= Date: Fri, 18 Dec 2020 17:02:33 +0100 Subject: [PATCH] deploy R-based lessons without using another action --- .github/workflows/website.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 719b39d..7b090b1 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -1,7 +1,9 @@ name: Website on: push: - branches: gh-pages + branches: + - gh-pages + - main pull_request: [] jobs: build-website: @@ -88,17 +90,15 @@ jobs: run: | git config --local user.email "actions@github.com" git config --local user.name "GitHub Actions" - git status + git checkout --orphan gha-rendering - name: Push site - if: ${{ github.event.push == 'true' && steps.check-rmd.outputs.count != 0 && github.ref == 'refs/head/main' }} + if: ${{ github.event.push == 'true' && steps.check-rmd.outputs.count != 0 && github.ref == 'refs/heads/main' }} run: | - git checkout --orphan gh-pages - git add . + rm -rf .bundle + git add --force . git commit -m "[GitHub Actions] render website" - git remote -v - git status - git push origin gh-pages + git push --force origin +gha-rendering:gh-pages - run: make lesson-check if: always() -- 2.30.2