Skip to content

Merge pull request #207 from hamlet-io/dependabot/npm_and_yarn/microm… #35

Merge pull request #207 from hamlet-io/dependabot/npm_and_yarn/microm…

Merge pull request #207 from hamlet-io/dependabot/npm_and_yarn/microm… #35

Workflow file for this run

# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages
on:
push:
branches: ["master"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Run Build
env:
TYPESENSE_SEARCH_HOST : typesearch.docsearch.gosource.com.au
TYPESENSE_SEARCH_API_KEY: ${{ secrets.TYPESENSE_SEARCH_API_KEY }}
run: |
yarn install --immutable
yarn run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: 'build/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
crawl:
runs-on: ubuntu-latest
needs:
- deploy
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Run Crawler
env:
TYPESENSE_CRAWLER_API_KEY: ${{ secrets.TYPESENSE_CRAWLER_API_KEY }}
TYPESENSE_CRAWLER_HOST: typesearch.docsearch.gosource.com.au
TYPESENSE_CRAWLER_PORT: '443'
TYPESENSE_CRAWLER_PROTOCOL: https
CRAWLER_START_URL: https://docs.hamlet.io
CRAWLER_INDEX_NAME: docs-hamlet-io
run: |
docker compose -f search/docker-compose.yml --profile build run builder
docker compose -f search/docker-compose.yml --profile crawl run crawler