PR for task 1310 #476
Workflow file for this run
This file contains hidden or 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: | |
| pull_request: | |
| branches: | |
| - docs | |
| push: | |
| branches: | |
| - docs | |
| jobs: | |
| # we deploy this though Cloudflare directly! | |
| # deploy: | |
| # name: Build & Publish | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # - name: Setup node | |
| # uses: actions/setup-node@v4 | |
| # with: | |
| # node-version: 20.x | |
| # - uses: pnpm/action-setup@v4 | |
| # with: | |
| # version: 10.12.4 | |
| # - run: pnpm install | |
| # - run: cd src/scripts && pnpm install | |
| # - run: cd src/scripts && node runok.js docs | |
| # - run: pnpm run build | |
| # env: | |
| # PUBLIC_MEILISEARCH_KEY: ${{ secrets.PUBLIC_MEILISEARCH_KEY }} | |
| # - name: Publish to Cloudflare Pages | |
| # uses: cloudflare/pages-action@v1 | |
| # with: | |
| # apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| # accountId: 60b76f40370d8320885e92e3daa114b1 | |
| # projectName: docs | |
| # directory: dist | |
| run-scraper: | |
| name: Run Search Scraper | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@master | |
| - name: Search Index | |
| env: | |
| HOST_URL: ${{ secrets.MEILISEARCH_HOST_URL }} | |
| API_KEY: ${{ secrets.MEILISEARCH_API_KEY }} | |
| run: | | |
| sleep 30 | |
| docker run -t --rm \ | |
| -e MEILISEARCH_HOST_URL=$HOST_URL \ | |
| -e MEILISEARCH_API_KEY=$API_KEY \ | |
| -v $PWD/docsearch.json:/docs-scraper/docsearch.json \ | |
| getmeili/docs-scraper:latest pipenv run ./docs_scraper docsearch.json |