Visit Multiple Sites Every Hour #1714
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: Visit Multiple Sites Every Hour | |
on: | |
schedule: | |
- cron: '0 * * * *' # 每小时触发一次 | |
# 如果需要手动触发,可以取消下面的注释 | |
# workflow_dispatch: | |
jobs: | |
visit-sites: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
site: | |
- name: 番茄小说预览版 | |
url: https://linjinpeng-fqnew.hf.space | |
- name: fanqie_xiufuban | |
url: https://linjinpeng-fanqiexiufuban.hf.space | |
- name: getfreenode | |
url: https://linjinpeng-getfreenode.hf.space | |
- name: chatnext | |
url: https://linjinpeng-chatgpt-next-web-siliconflowapi-1.hf.space | |
- name: cursor | |
url: https://linjinpeng-cursor-api.hf.space | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Make HTTP request to ${{ matrix.site.name }} and measure response time | |
run: | | |
url="${{ matrix.site.url }}" | |
response_time=$(curl -o /dev/null -s -w '%{time_total}\n' "$url") | |
echo "${{ matrix.site.name }} Response time: $response_time seconds" > "time_${{ matrix.site.name }}.txt" | |
- name: Upload time_${{ matrix.site.name }}.txt as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: response-time-${{ matrix.site.name }} | |
path: "time_${{ matrix.site.name }}.txt" |