Merge pull request #204 from hamlet-io/dependabot/npm_and_yarn/ws-7.5.10 #33
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
# 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 |