Skip to content

Remove extension - #151 #55

Remove extension - #151

Remove extension - #151 #55

Workflow file for this run

name: build-search-indices
on:
pull_request:
types: [closed]
branches:
- main
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
pull-requests: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
buildSearch:
runs-on: ubuntu-latest
if: ${{ ! contains(github.event.head_commit.message, 'Automate update') }}
steps:
- uses: actions/checkout@v4
# Uses the private access token from above link
with:
fetch-depth: 0
token: ${{ secrets.GH_SUBMODULE_SECRET }}
- name: Restore timestamps
uses: chetan/git-restore-mtime-action@v1
- name: Pull latest changes
run: git pull origin main -X theirs
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Build search
run: npm run search
- name: Commit & push changes
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions - build search index"
git status
git add .
git commit -m "Automate update site-search-data.json"
git push origin main