cleanups #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GitHub Pages | |
on: | |
push: | |
branches: | |
- master | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
# Single deploy job since we're just deploying | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{steps.deployment.outputs.page_url}} | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_DEST_REPO: "xpack/dev-tools-web-preview" | |
GIT_COMMIT_USER_EMAIL: "ilg@livius.net" | |
GIT_COMMIT_USER_NAME: "Jekyll site CI" | |
NOKOGIRI_USE_SYSTEM_LIBRARIES: true | |
steps: | |
- name: Checkout | |
# https://github.com/actions/checkout | |
uses: actions/checkout@v4 | |
with: | |
# The full history, required to compute lastUpdatedAt | |
fetch-depth: 0 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
# Version range or exact version of a Ruby version to use, using semver version range syntax. | |
# https://www.ruby-lang.org/en/downloads/releases/ | |
# https://rubygems.org/gems/bundler | |
ruby-version: '3.2' | |
- uses: actions/cache@v4 | |
with: | |
path: vendor/bundle | |
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-gems- | |
- name: Bundle install | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential patch ruby-dev zlib1g-dev liblzma-dev libxslt-dev pkg-config | |
gem install bundler:2.4 | |
bundle config path vendor/bundle | |
bundle install --jobs 4 --retry 3 | |
ls -l vendor/bundle | |
echo bundle exec htmlproofer --version | |
- name: Show environment | |
run: | | |
pwd | |
env | sort | |
- name: Build the site | |
run: | | |
ls -l | |
bundle exec jekyll build --destination "_site" | |
touch "_site/.nojekyll" | |
ls -l | |
- name: Setup Pages | |
# https://github.com/actions/configure-pages | |
uses: actions/configure-pages@v5 | |
- name: Upload artifact | |
# https://github.com/actions/upload-pages-artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
# Upload entire repository | |
path: './_site' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
# https://github.com/actions/deploy-pages | |
uses: actions/deploy-pages@v4 |