-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (41 loc) · 1.94 KB
/
flat.ifixit.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: ifixit
on:
push:
paths:
- .github/workflows/flat.ifixit.yml # Only run a new workflow every time this file (flat.yaml) file changes
workflow_dispatch: # Required even though this is currently empty
schedule:
# Run this workflow: At 8:08am on every 5th day from 1st through 31st
# https://cron.help/#8_8_1/5_*_*
- cron: '8 8 1/5 * *'
jobs:
scheduled:
runs-on: ubuntu-latest
steps: # This workflow has 3 steps
# The first step is to check out the repository so it can read the files inside of it and do other operations
- name: Check out repo
uses: actions/checkout@v4
# This step installs Deno, which is a new Javascript runtime that improves on Node. We'll use it for postprocessing later
- name: Setup deno
uses: denoland/setup-deno@main
with:
deno-version: v1.x
# The third step is a Flat Action step. We fetch the data in the http_url and save it as downloaded_filename
- name: Fetch data
uses: githubocto/flat@v3
with:
http_url: https://www.ifixit.com/smartphone-repairability?sort=date # The data to fetch every 5 minutes
downloaded_filename: data/ifixit/smartphone-repairability.html # The http_url gets saved and renamed in our repository as ifixit/smartphone-repairability.html
postprocess: src/ifixit/postprocess.ts # A postprocessing javascript or typescript file written in Deno
- name: Fetch data
uses: githubocto/flat@v3
with:
http_url: https://www.ifixit.com/laptop-repairability?sort=date
downloaded_filename: data/ifixit/laptop-repairability.html
postprocess: src/ifixit/postprocess.ts
- name: Fetch data
uses: githubocto/flat@v3
with:
http_url: https://www.ifixit.com/tablet-repairability?sort=date
downloaded_filename: data/ifixit/tablet-repairability.html
postprocess: src/ifixit/postprocess.ts