Skip to content

Auto-Update addons.txt #262

Auto-Update addons.txt

Auto-Update addons.txt #262

Workflow file for this run

name: Auto-Update addons.txt
on:
repository_dispatch:
types: force-build
workflow_dispatch:
schedule:
- cron: "0 0 * * 1"
jobs:
update_addontxt:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Update latest addons from workshop
working-directory: other/scraper
run: |
python scrape.py ${{secrets.STEAM_AUTH_KEY}}
- name: Deploy over SFTP
run: |
mkdir ~/.ssh
chmod 700 ~/.ssh
echo "$PRIVATE_KEY_ENV" > ~/.ssh/id_rsa
echo StrictHostKeyChecking no > ~/.ssh/config
chmod 600 ~/.ssh/id_rsa
sftp -P ${{ secrets.FILEHOST_PORT }} ${{ secrets.FILEHOST_USER }}@${{ secrets.FILEHOST_URL }} <<< $'cd ${{ secrets.FILEHOST_PATH }} \nput other/scraper/addons.txt'
env:
PRIVATE_KEY_ENV: ${{ secrets.FILEHOST_PRIVKEY }}