From 040fddfe61a46f06cc74a677748a2191ac872660 Mon Sep 17 00:00:00 2001 From: Arianna Bunnell <88562918+AriBunnell@users.noreply.github.com> Date: Sat, 12 Oct 2024 16:26:46 -1000 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 45 ++++++++++++-------------------------- 1 file changed, 14 insertions(+), 31 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index de2f965..167fcf0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,3 +1,8 @@ +# 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 @@ -28,44 +33,22 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - # 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 - - # Install Bundler and cache gems in the user's local directory - - name: Install Bundler - run: | - source ~/.bashrc - gem install bundler --user-install - echo 'export PATH="$HOME/.local/share/gem/ruby/3.1.4/bin:$PATH"' >> ~/.bashrc - export PATH="$HOME/.local/share/gem/ruby/3.1.4/bin:$PATH" - bundle config set path 'vendor/bundle' - bundle install - + - 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 - name: Setup Pages id: pages uses: actions/configure-pages@v4 - - name: Build with Jekyll - run: | - source ~/.bashrc - export PATH="$HOME/.local/share/gem/ruby/3.1.4/bin:$PATH" - bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" + # 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 # Deployment job