-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (40 loc) · 1.37 KB
/
linkhealth_job.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
44
45
46
47
# name: Periodic Link Checker
# on:
# schedule:
# - cron: '0 0 * * 0' # Run every Sunday at midnight (UTC time)
# jobs:
# link_check:
# runs-on: ubuntu-latest
# defaults:
# run:
# working-directory: ./linkchecker/
# strategy:
# matrix:
# python-version: [3.11]
# steps:
# - uses: actions/checkout@v4
# - name: Set up Python
# uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install -r requirements.txt
# - name: Run link checker script
# env:
# POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
# POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
# POSTGRES_HOST: ${{ secrets.POSTGRES_HOST }}
# POSTGRES_PORT: ${{ secrets.POSTGRES_PORT }}
# POSTGRES_DB: ${{ secrets.POSTGRES_DB }}
# run: python linkchecker.py
# - name: Run FastAPI server
# env:
# POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
# POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
# POSTGRES_HOST: ${{ secrets.POSTGRES_HOST }}
# POSTGRES_PORT: ${{ secrets.POSTGRES_PORT }}
# POSTGRES_DB: ${{ secrets.POSTGRES_DB }}
# run: |
# nohup python -m uvicorn api:app --host 0.0.0.0 --port 8000 &