Skip to content

Commit

Permalink
Update gh-pages.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
genuinemoses authored Dec 11, 2023
1 parent bcbbf06 commit dd7844a
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,17 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/[email protected]
with:
ref: "gh-pages"

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 0 # Increment this number if you need to re-download cached gems

- name: Clone target branch
run: |
REMOTE_BRANCH="${REMOTE_BRANCH:-gh-pages}"
REMOTE_REPO="https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git"
echo "Publishing to ${GITHUB_REPOSITORY} on branch ${REMOTE_BRANCH}"
rm -rf _site/
git clone --depth=1 --branch="${REMOTE_BRANCH}" --single-branch --no-checkout "${REMOTE_REPO}" _site/

- name: Build site
run: bundle exec jekyll build --verbose --trace

Expand Down

0 comments on commit dd7844a

Please sign in to comment.