-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (32 loc) · 1.06 KB
/
fetch-web.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
name: Fetch Web Page
on:
schedule:
- cron: "* */12 * * *"
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
fetch-web-page:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch Web Page
run: |
response=$(curl --location --header "Authorization: Bearer ${{ secrets.OMG_TOKEN }}" \
"https://api.omg.lol/address/${{ secrets.OMG_ADDR }}/web" | \
jq -r .response)
jq -r .content <<< $response > web.md
jq -r .css <<< $response > web.css
jq -r .head <<< $response > web_head.html
- name: Commit Now Page
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'fetch web page'
commit_author: 'github-actions[bot] <github-actions[bot]@users.noreply.github.com>'
commit_user_email: 'github-actions[bot]@users.noreply.github.com'
commit_user_name: 'github-actions[bot]'
file_pattern: 'web.md web.css web_head.html'