Skip to content

chore(ci): Add debug step to arXiv workflow #13

chore(ci): Add debug step to arXiv workflow

chore(ci): Add debug step to arXiv workflow #13

name: arXiv Daily Paper Crawler
on:
schedule:
# Run at 9 AM UTC (4 AM EST) every day
- cron: '0 9 * * *'
workflow_dispatch: # Allow manual triggering
push:
branches:
- master
paths:
- 'arxiv-config.yml'
- '.github/workflows/arxiv-daily-crawler.yml'
permissions:
contents: write
pages: write
id-token: write
jobs:
fetch-arxiv-papers:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
clean: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: 'requirements-arxiv.txt'
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements-arxiv.txt
- name: Debug: Verify File Content

Check failure on line 43 in .github/workflows/arxiv-daily-crawler.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/arxiv-daily-crawler.yml

Invalid workflow file

You have an error in your yaml syntax on line 43
run: |
echo "Verifying content of scripts/fetch_arxiv_papers.py"
cat scripts/fetch_arxiv_papers.py
- name: Fetch arXiv papers
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: |
python scripts/fetch_arxiv_papers.py
- name: Generate summary report
run: |
python scripts/generate_summary.py
- name: Commit and push updates
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
# Add files that exist
git add arxiv-papers/ 2>/dev/null || true
git add daily-summaries/ 2>/dev/null || true
git add README_ARXIV_DAILY.md 2>/dev/null || true
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "📚 Daily arXiv update: $(date +'%Y-%m-%d')"
git push
fi
- name: Create GitHub Issue (Optional)
if: success()
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const summaryPath = 'daily-summaries/summary-latest.md';
// Check if summary file exists
if (!fs.existsSync(summaryPath)) {
console.log('No summary file found - skipping issue creation (no papers found today)');
return;
}
const summary = fs.readFileSync(summaryPath, 'utf8');
await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: `📚 arXiv Daily Digest - ${new Date().toISOString().split('T')[0]}`,
body: summary,
labels: ['arxiv-daily', 'automated']
});
notify:
needs: fetch-arxiv-papers
runs-on: ubuntu-latest
if: always()
steps:
- name: Send notification (if configured)
run: |
echo "arXiv papers updated successfully!"
# Add email notification, Slack webhook, or Discord webhook here if needed