Scrape #1042
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 | |
on: | |
workflow_dispatch: | |
schedule: | |
# Run every day | |
- cron: 36 5 * * * | |
jobs: | |
scrape: | |
name: Run Scrapers | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
ocaml-compiler: | |
- "4.14" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Use OCaml ${{ matrix.ocaml-compiler }} | |
uses: ocaml/setup-ocaml@v3 | |
with: | |
ocaml-compiler: ${{ matrix.ocaml-compiler }} | |
dune-cache: ${{ matrix.os != 'macos-latest' }} | |
opam-repositories: | | |
pin: git+https://github.com/ocaml/opam-repository#c45f5bab71d3589f41f9603daca5acad14df0ab0 | |
opam-disable-sandboxing: true | |
- name: Install system dependencies | |
run: sudo apt update && sudo apt-get install libev-dev libonig-dev libcurl4-openssl-dev | |
- name: Install opam dependencies | |
run: opam install --deps-only --with-test . | |
- name: Build scraper | |
run: | | |
opam exec -- dune build tool/ood-gen/bin/scrape.exe | |
- name: Run scrapers | |
run: | | |
opam exec -- dune exec tool/ood-gen/bin/scrape.exe planet | |
opam exec -- dune exec tool/ood-gen/bin/scrape.exe video | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
title: '[scrape.yml] New OCaml blog posts and videos' | |
labels: scrape | |
add-paths: | | |
data/video-watch.yml | |
data/video-youtube.yml | |
data/planet/*/*.md | |
commit-message: | | |
[scrape.yml] New OCaml Planet blog posts and videos |