Skip to content

Merge pull request #52 from dhaupin/evolution #745

Merge pull request #52 from dhaupin/evolution

Merge pull request #52 from dhaupin/evolution #745

Workflow file for this run

name: Deploy Docs
on:
push:
branches: [main]
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true
working-directory: './docs'
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
- name: Build Jekyll
run: |
cd docs
bundle exec jekyll build
env:
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Download Pagefind
working-directory: docs
run: |
VERSION=$(curl -sL "https://api.github.com/repos/Pagefind/pagefind/releases/latest" | grep '"tag_name"' | sed 's/.*"v\([^"]*\)".*/\1/')
curl -sL "https://github.com/pagefind/pagefind/releases/download/v${VERSION}/pagefind-v${VERSION}-x86_64-unknown-linux-musl.tar.gz" -o pagefind.tar.gz
tar -xzf pagefind.tar.gz
rm pagefind.tar.gz
chmod +x pagefind
- name: Create search index
working-directory: docs
run: ./pagefind --site _site
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './docs/_site'
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4