Skip to content

Commit

Permalink
Update build-site.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Trevor Grant <trevor.d.grant@gmail.com>
  • Loading branch information
rawkintrevo authored Feb 23, 2025
1 parent f5e7609 commit e8f2999
Showing 1 changed file with 26 additions and 5 deletions.
31 changes: 26 additions & 5 deletions .github/workflows/build-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ on:
branches: [main]
pull_request:


# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -26,14 +37,24 @@ jobs:
- name: Build site
working-directory: ./website
env:
JEKYLL_ENV: production
run: |
gem install bundler
bundle install
bundle exec jekyll build
- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v3

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website/_site
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit e8f2999

Please sign in to comment.