-
Notifications
You must be signed in to change notification settings - Fork 35
33 lines (27 loc) · 892 Bytes
/
main.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
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 }}