diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index eb1a0bd..de2f965 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,12 +46,36 @@ jobs: # 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.2.0/bin:$PATH"' >> ~/.bashrc - export PATH="$HOME/.local/share/gem/ruby/3.2.0/bin:$PATH" + 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 Pages id: pages - uses: + 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 }}" + env: + JEKYLL_ENV: production + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4