lolz/.github/workflows/fetch-web.yml

36 lines
1.1 KiB
YAML
Raw Normal View History

2024-03-07 15:44:51 +00:00
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
2024-06-29 01:26:43 +00:00
uses: actions/checkout@v4
2024-03-07 15:44:51 +00:00
- 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
2024-06-29 01:26:43 +00:00
uses: stefanzweifel/git-auto-commit-action@v5
2024-03-07 15:44:51 +00:00
with:
commit_message: 'fetch web page'
2024-08-13 21:33:24 +00:00
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]'
2024-03-07 15:44:51 +00:00
file_pattern: 'web.md web.css web_head.html'