github-pages #1225
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: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
github-pages: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: 💎 setup ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.3.1 | |
- name: Build Jekyll site | |
uses: limjh16/jekyll-action-ts@v2 | |
with: | |
enable_cache: true | |
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | |
restore-keys: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | |
- name: Run Antora | |
uses: kameshsampath/antora-site-action@master | |
with: | |
antora_playbook: playbook.yml | |
site_sources_path: 'docs-site' | |
- name: Copy antora docs site to jekyll web site | |
run: | | |
mkdir -p ./_site/documentation | |
cp -rfv ./docs-site/build/site/* ./_site/documentation | |
- name: 🚀 deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./_site | |
- name: Read search configuration | |
id: config | |
run: echo ::set-output name=config::$(cat algolia-config.json) | |
- name: Update search index | |
uses: darrenjennings/algolia-docsearch-action@master | |
with: | |
algolia_application_id: ${{ secrets.ALGOLIA_APPLICATION_ID }} | |
algolia_api_key: ${{ secrets.ALGOLIA_ADMIN_KEY }} | |
file: 'algolia-config.json' |