Asset Crawler for common Web pages
import { savePage } from 'web-fetch';
savePage({
source: 'http://URL.to/one/of/your/old/posts/'
});
https://github.com/kaiyuanshe/KYS-service
web-fetch http://URL.to/one/of/your/old/posts/
name: Fetch Web pages
on:
issues:
types:
- opened
jobs:
Fetch-and-Save:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 9
- uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- uses: browser-actions/setup-chrome@v1
- name: Setup Web-fetch
run: pnpm i web-fetch -g
- name: Fetch first URL in Issue Body
run: web-fetch $(echo "${{ github.event.issue.Body }}" | grep -Eo "https?://\S+")
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: '${{ github.event.issue.title }}'
Lines 10 to 29 in d4c574a