Skip to content

algolia reindex on publish #227

algolia reindex on publish

algolia reindex on publish #227

Workflow file for this run

name: Publish to GitHub Pages

Check failure on line 1 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish.yml

Invalid workflow file

(Line: 51, Col: 7): Unexpected value 'run'
on:
push:
branches: [master]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
group: github-pages
cancel-in-progress: false
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Configure Pages
uses: actions/configure-pages@v3
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install Antora
run: npm i antora
- name: Generate Site
env:
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
run: npm run buildAll
- name: Upload Artifacts
uses: actions/upload-pages-artifact@v3
with:
path: build/site
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name:
id: reindex
uses: docker/setup-docker-action@v5
env:
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
working-directory: ./docsearch
run: |
docker run \
-e APPLICATION_ID=${ALGOLIA_APP_ID} \
-e API_KEY=${ALGOLIA_API_KEY} \
-e CONFIG="`cat config.json`" \
--privileged \
-v $PWD:/docsearch:Z \
--rm -t \
algolia/docsearch-scraper:v1.12.0