Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,19 @@ concurrency:

jobs:
deploy:
# The repository variable RUNNER picks the runner: "local" runs the job on
# the self-hosted runner with that label, no variable means GitHub's runners
runs-on: ${{ vars.RUNNER || 'ubuntu-latest' }}
# Always GitHub's own runners: this repository is public, and a job from
# it must never run on a personal computer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
submodules: true

- uses: ruby/setup-ruby@v1
if: runner.environment == 'github-hosted'
with:
ruby-version: "3.3"
bundler-cache: true

# The self-hosted runner brings its own Ruby and keeps the gems between runs
- name: Install gems
if: runner.environment == 'self-hosted'
run: |
export BUNDLE_PATH="$RUNNER_TOOL_CACHE/bundle"
bundle install --jobs 4
# The build step needs the same gems
echo "BUNDLE_PATH=$BUNDLE_PATH" >> "$GITHUB_ENV"

- name: Build
env:
JEKYLL_ENV: production
Expand Down
17 changes: 4 additions & 13 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,20 @@ jobs:
preview:
# Pull requests from forks get a read-only token and cannot publish
if: github.event.pull_request.head.repo.full_name == github.repository
# The repository variable RUNNER picks the runner: "local" runs the job on
# the self-hosted runner with that label, no variable means GitHub's runners
runs-on: ${{ vars.RUNNER || 'ubuntu-latest' }}
# Always GitHub's own runners: this repository is public, and a job from
# it must never run on a personal computer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
submodules: true

- uses: ruby/setup-ruby@v1
if: runner.environment == 'github-hosted' && github.event.action != 'closed'
if: github.event.action != 'closed'
with:
ruby-version: "3.3"
bundler-cache: true

# The self-hosted runner brings its own Ruby and keeps the gems between runs
- name: Install gems
if: runner.environment == 'self-hosted' && github.event.action != 'closed'
run: |
export BUNDLE_PATH="$RUNNER_TOOL_CACHE/bundle"
bundle install --jobs 4
# The build step needs the same gems
echo "BUNDLE_PATH=$BUNDLE_PATH" >> "$GITHUB_ENV"

- name: Build
if: github.event.action != 'closed'
env:
Expand Down
Loading