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 a990bbc commit 040fddf
Showing 1 changed file with 14 additions and 31 deletions.
45 changes: 14 additions & 31 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 040fddf

Please sign in to comment.