Merge pull request #264 from Cordtus/patch-1 #137
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: Scrape Docs Site | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
scrape: | |
runs-on: ubuntu-latest | |
steps: | |
- name: check out code 🛎 | |
uses: actions/checkout@v2 | |
# inject secrets as environment variables | |
# then pass their values into the Docker container using "-e" syntax | |
# and inject config.json contents as another variable | |
- name: Sleep for 5 min to allow site to be published. | |
run: | | |
sleep 5m | |
- name: Scrape the Site 🧽 | |
env: | |
APPLICATION_ID: ${{ secrets.BETA_APPLICATION_ID }} | |
API_KEY: ${{ secrets.BETA_API_KEY }} | |
run: | | |
docker run \ | |
-e APPLICATION_ID -e API_KEY \ | |
-e CONFIG="$(cat docsearch.config.json)" \ | |
algolia/docsearch-scraper |