fix: update jekyll and kramdown #80
This file contains hidden or 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: Deploy Jekyll site to GitHub Pages | |
on: | |
push: | |
branches: | |
- main # Trigger on pushes to 'main' for production | |
- staging # Trigger on pushes to 'staging' for staging | |
jobs: | |
build_and_deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.1.3' # Use your required Ruby version | |
- name: Install dependencies | |
run: | | |
gem install bundler | |
bundle install | |
- name: Build Jekyll site | |
run: bundle exec jekyll build | |
# Add CNAME file to _site directory for custom domain | |
- name: Add CNAME file for custom domain | |
run: echo "compbio.hms.harvard.edu" > ./_site/CNAME | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./_site | |
destination_dir: ${{ github.ref == 'refs/heads/staging' && 'staging' || '' }} | |
publish_branch: gh-pages # Correct input for target branch |