Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
AriBunnell authored Oct 13, 2024
1 parent 527ac60 commit b75c06f
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy Jekyll site to Pages 2

Expand Down Expand Up @@ -33,20 +28,38 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0
with:
ruby-version: '3.1' # Not needed with a .ruby-version file
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

# Manually install Ruby using rbenv
- name: Install Ruby using rbenv
run: |
sudo apt-get update
sudo apt-get install -y libssl-dev zlib1g-dev
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
source ~/.bashrc
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
~/.rbenv/bin/rbenv install 3.1.4
~/.rbenv/bin/rbenv global 3.1.4
~/.rbenv/bin/rbenv rehash
touch /opt/hostedtoolcache/Ruby/3.1.4/x64.complete
# Install Bundler and cache gems
- name: Install Bundler
run: |
gem install bundler
bundle install
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4

- name: Build with Jekyll
# Outputs to the './_site' directory by default
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: production

- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v3
Expand Down

0 comments on commit b75c06f

Please sign in to comment.