Type safety #64
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: Deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
- name: Install dependencies | |
run: bun install --frozen-lockfile | |
- name: Build | |
run: bun run build | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: github-pages | |
path: build/ | |
deploy: | |
needs: build | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: github-pages | |
path: build | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./build | |
scrape: | |
needs: deploy | |
runs-on: ubuntu-latest | |
env: | |
TYPESENSE_API_KEY: ${{ secrets.TYPESENSE_API_KEY }} | |
TYPESENSE_HOST: typesense.cacic.dev.br | |
TYPESENSE_PORT: 443 | |
TYPESENSE_PROTOCOL: https | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Run DocSearch Scraper | |
shell: bash | |
run: | | |
docker run \ | |
-e TYPESENSE_API_KEY=${{ env.TYPESENSE_API_KEY }} \ | |
-e TYPESENSE_HOST="${{ env.TYPESENSE_HOST }}" \ | |
-e TYPESENSE_PORT="${{ env.TYPESENSE_PORT }}" \ | |
-e TYPESENSE_PROTOCOL="${{ env.TYPESENSE_PROTOCOL }}" \ | |
-e CONFIG="$(cat typesense-config.json | jq -r tostring)" \ | |
typesense/docsearch-scraper |