This repository has been archived by the owner on Nov 6, 2023. It is now read-only.
Crawl Ballerina VSCode Docs #73
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: Crawl Ballerina VSCode Docs | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '30 18 * * 1' # 00:00 in LK time (GMT+5:30) on every Monday | |
jobs: | |
run-crawler: | |
name: Run Algolia Crawler | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install jq | |
run: DEBIAN_FRONTEND=noninteractive sudo apt-get update && sudo apt-get install jq -y | |
- name: Write Secrets to File | |
env: | |
SECRET_NAME: 'API_KEY' | |
API_KEY: ${{ secrets.WRITE_API_KEY }} | |
run: | | |
echo "${SECRET_NAME}=${API_KEY}" >> ./.github/.env | |
- name: Run Docker image | |
uses: actions-hub/docker/cli@master | |
env: | |
SKIP_LOGIN: true | |
- run: | | |
docker --version | |
docker run --env-file=./.github/.env -e "CONFIG=$(cat ./.github/configs/config.json | jq -r tostring)" algolia/docsearch-scraper |