From b75c06f1155c5383daef64d9c407f2f1c3375e4f Mon Sep 17 00:00:00 2001 From: Arianna Bunnell <88562918+AriBunnell@users.noreply.github.com> Date: Sat, 12 Oct 2024 15:51:35 -1000 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 167fcf0..2db634d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 @@ -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