fix header links on mobile & update search dark theme (#71) #23
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: Publish | |
on: | |
push: | |
branches: | |
- docs | |
jobs: | |
deploy: | |
name: Build & Publish | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 20.x | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 8 | |
- run: pnpm install | |
- run: cd src/scripts && pnpm install | |
- run: node src/scripts/runok.js docs | |
- run: pnpm run build | |
- name: Publish to Cloudflare Pages | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: 60b76f40370d8320885e92e3daa114b1 | |
projectName: docs | |
directory: dist | |
run-scraper: | |
needs: deploy | |
name: Run Search Scraper | |
runs-on: ubuntu-18.04 | |
steps: | |
- uses: actions/checkout@master | |
- name: Search Index | |
env: | |
HOST_URL: ${{ secrets.MEILISEARCH_HOST_URL }} | |
API_KEY: ${{ secrets.MEILISEARCH_API_KEY }} | |
CONFIG_FILE_PATH: docsearch.json | |
run: | | |
docker run -t --rm \ | |
-e MEILISEARCH_HOST_URL=$HOST_URL \ | |
-e MEILISEARCH_API_KEY=$API_KEY \ | |
-v $CONFIG_FILE_PATH:/docs-scraper/docsearch.json \ | |
getmeili/docs-scraper:latest pipenv run ./docs_scraper docsearch.json | |