Skip to content

Commit

Permalink
Fixed CI action
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianTrommer committed Sep 9, 2024
1 parent fbb55e6 commit 84c920b
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
- 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

0 comments on commit 84c920b

Please sign in to comment.