lwn-rss/.gitea/workflows/update-feeds.yml
Benjamin Hays 8c155433e7
All checks were successful
Update RSS Feeds / deploy (push) Successful in 13s
fix actions formatting
2024-11-09 12:10:41 -05:00

35 lines
901 B
YAML

name: Update RSS Feeds
on:
push:
branches:
- 'main'
schedule:
- cron: '@hourly'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Copy SSH Key
run: |
mkdir ~/.ssh/
echo "Host *" > ~/.ssh/config
echo " StrictHostKeyChecking no" >> ~/.ssh/config
echo '${{secrets.SSH_PRIVATE_KEY}}' > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
- name: Install Prereqs
run: |
apt update -y
apt install python3-requests python3-lxml -y
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Generate Feeds
run: |
python3 generate_feeds.py
- name: Deploy to Server
run: |
scp -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -r lwn-*.xml bhays@10.0.0.20:/var/www/html/