From 84c920b404fd5f88702c3d20bbe5cae913bf463a Mon Sep 17 00:00:00 2001 From: JulianTrommer <46600808+JulianTrommer@users.noreply.github.com> Date: Mon, 9 Sep 2024 11:40:45 +0200 Subject: [PATCH] Fixed CI action --- .github/workflows/CI.yaml | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index fa23ba6..7476ee4 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -12,21 +12,22 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Build the site in the jekyll/builder container - - uses: actions/checkout@v4 - run: | - docker run \ - -v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \ - jekyll/builder:latest /bin/bash -c "chmod 777 /srv/jekyll && jekyll build --future" - - name: Push the site to the gh-pages branch - if: ${{ github.event_name == 'push' }} - run: | - sudo chown $( whoami ):$( whoami ) ${{ github.workspace }}/_site - cd ${{ github.workspace }}/_site - git init -b gh-pages - git config user.name ${{ github.actor }} - git config user.email ${{ github.actor }}@users.noreply.github.com - git remote add origin https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git - git add . - git commit -m "Deploy site built from commit ${{ github.sha }}" - git push -f -u origin gh-pages \ No newline at end of file + - name: Build the site in the jekyll/builder container + uses: actions/checkout@v4 + run: | + docker run \ + -v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \ + jekyll/builder:latest /bin/bash -c "chmod 777 /srv/jekyll && jekyll build --future" + + - name: Push the site to the gh-pages branch + if: ${{ github.event_name == 'push' }} + run: | + sudo chown $( whoami ):$( whoami ) ${{ github.workspace }}/_site + cd ${{ github.workspace }}/_site + git init -b gh-pages + git config user.name ${{ github.actor }} + git config user.email ${{ github.actor }}@users.noreply.github.com + git remote add origin https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git + git add . + git commit -m "Deploy site built from commit ${{ github.sha }}" + git push -f -u origin gh-pages \ No newline at end of file