Auto-Update addons.txt #271
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: 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 }} |