mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
add catalogs deployment
This commit is contained in:
44
.github/workflows/deploy_catalogs.yml
vendored
Normal file
44
.github/workflows/deploy_catalogs.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
name: Deploy Catalogs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: master
|
||||
paths:
|
||||
- 'catalogs/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Create Docker image
|
||||
run: |
|
||||
docker build -t torrentio-catalogs:latest ./catalogs/
|
||||
docker save torrentio-catalogs:latest > torrentio_catalogs_latest.tar
|
||||
|
||||
- name: Upload Docker image
|
||||
uses: appleboy/scp-action@master
|
||||
with:
|
||||
host: ${{ secrets.SCRAPER_SSH_HOST }}
|
||||
username: ${{ secrets.SCRAPER_SSH_USERNAME }}
|
||||
port: ${{ secrets.SCRAPER_SSH_PORT }}
|
||||
key: ${{ secrets.SCRAPER_SSH_KEY }}
|
||||
source: torrentio_catalogs_latest.tar
|
||||
target: /tmp/docker
|
||||
overwrite: true
|
||||
|
||||
- name: Deploy Docker image
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
host: ${{ secrets.SCRAPER_SSH_HOST }}
|
||||
username: ${{ secrets.SCRAPER_SSH_USERNAME }}
|
||||
port: ${{ secrets.SCRAPER_SSH_PORT }}
|
||||
key: ${{ secrets.SCRAPER_SSH_KEY }}
|
||||
script: |
|
||||
docker load -i /tmp/docker/torrentio_catalogs_latest.tar
|
||||
docker stop torrentio-catalogs
|
||||
docker rm torrentio-catalogs
|
||||
docker run -p 80:7000 -d --name torrentio-catalogs--restart always -e MONGODB_URI=${{ secrets.SCRAPER_MONGODB_URI }} -e DATABASE_URI=${{ secrets.DATABASE_URI }} torrentio-catalogs:latest
|
||||
docker image prune -f
|
||||
3
.github/workflows/deploy_scraper.yml
vendored
3
.github/workflows/deploy_scraper.yml
vendored
@@ -5,6 +5,7 @@ on:
|
||||
branches: master
|
||||
paths-ignore:
|
||||
- 'addon/**'
|
||||
- 'catalogs/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -40,5 +41,5 @@ jobs:
|
||||
docker load -i /tmp/docker/torrentio_scraper_latest.tar
|
||||
docker stop torrentio-scraper
|
||||
docker rm torrentio-scraper
|
||||
docker run -p 80:7000 -d --name torrentio-scraper --restart always -e MONGODB_URI=${{ secrets.SCRAPER_MONGODB_URI }} -e DATABASE_URI=${{ secrets.DATABASE_URI }} -e ENABLE_SCHEDULING=true -e PROXY_HOST=${{ secrets.SCRAPER_PROXY_HOST }} -e PROXY_TYPE=${{ secrets.SCRAPER_PROXY_TYPE }} -e ERAI_RSS_KEY=${{ secrets.SCRAPER_ERAI_RSS_KEY }} torrentio-scraper:latest
|
||||
docker run -p 7000:7000 -d --name torrentio-scraper --restart always -e MONGODB_URI=${{ secrets.SCRAPER_MONGODB_URI }} -e DATABASE_URI=${{ secrets.DATABASE_URI }} -e ENABLE_SCHEDULING=true -e PROXY_HOST=${{ secrets.SCRAPER_PROXY_HOST }} -e PROXY_TYPE=${{ secrets.SCRAPER_PROXY_TYPE }} -e ERAI_RSS_KEY=${{ secrets.SCRAPER_ERAI_RSS_KEY }} torrentio-scraper:latest
|
||||
docker image prune -f
|
||||
|
||||
Reference in New Issue
Block a user