Docs: Add pagefind search for bnd manual #661
Workflow file for this run
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: 'Docs Build' | ||
on: | ||
push: | ||
branches-ignore: | ||
- 'dependabot/**' | ||
paths: | ||
- 'docs/**' | ||
- '.github/**/*docs*' | ||
pull_request: | ||
paths: | ||
- 'docs/**' | ||
- '.github/**/*docs*' | ||
env: | ||
LC_ALL: en_US.UTF-8 | ||
defaults: | ||
run: | ||
shell: bash | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
jobs: | ||
docs: | ||
name: GitHub Pages | ||
runs-on: ubuntu-latest | ||
env: | ||
BUNDLE_GEMFILE: Gemfile | ||
BUNDLE_PATH: vendor/bundle | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e | ||
with: | ||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs | ||
- name: Git Checkout | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@f2f42b7848feff522ffa488a5236ba0a73bccbdd | ||
with: | ||
ruby-version: 2.7 | ||
bundler-cache: true | ||
working-directory: docs | ||
# Download and install the Pagefind binary | ||
# see releases: https://github.com/CloudCannon/pagefind/releases | ||
- name: Install Pagefind for Search | ||
run: | | ||
cd docs | ||
curl -L https://github.com/CloudCannon/pagefind/releases/download/v1.3.0/pagefind-v1.3.0-x86_64-unknown-linux-musl.tar.gz \ | ||
-o pagefind.tar.gz | ||
tar xzf pagefind.tar.gz | ||
chmod +x pagefind | ||
- name: Build | ||
run: | | ||
./.github/scripts/docs.sh | ||
- name: Upload artifact | ||
# Automatically uploads an artifact from the './_site' directory by default | ||
uses: actions/upload-pages-artifact@v3 | ||
path: docs/_site | ||
# Deployment job | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: docs | ||
if: github.ref == 'refs/heads/master' # <= Restrict deploy to master | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |