Jekyll Build and Deploy #2220
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Jekyll Build and Deploy | |
on: | |
push: | |
branches: | |
# deploy on updates on main | |
- main | |
schedule: | |
# redeploy every morning to update unpublished pages | |
- cron: "0 2 * * *" | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.2' | |
bundler-cache: true | |
- name: Build Jekyll | |
run: | | |
bundle install | |
bundle exec jekyll build | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GH_PAGES_TOKEN }} | |
publish_dir: ./_site |