Skip to content

Commit

Permalink
Try actions/deploy-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
itspriddle committed Mar 3, 2024
1 parent f4a317b commit 58530f9
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/jekyll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:

# Define a job named `build-and-publish` in your workflow.
jobs:
build-and-publish:
build:
runs-on: ubuntu-latest # This job uses a GitHub-hosted runner.

# env:
Expand All @@ -28,7 +28,7 @@ jobs:
if: "!contains(github.event.head_commit.message, '[ci skip]')"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
Expand All @@ -47,17 +47,17 @@ jobs:
env:
# For jekyll-github-metadata
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v1

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
run: |
SOURCE_COMMIT="$(git log -1 --pretty="%an: %B" "$GITHUB_SHA")"
pushd _site &>/dev/null
: > .nojekyll
git add --all
git -c user.name="${GITHUB_ACTOR}" -c user.email="${GITHUB_ACTOR}@users.noreply.github.com" \
commit --quiet \
--message "Deploy site from ${GITHUB_SHA}" \
--message "$SOURCE_COMMIT"
git push
popd &>/dev/null
id: deployment
uses: actions/deploy-pages@v3

0 comments on commit 58530f9

Please sign in to comment.