diff --git a/.github/workflows/docker-deploy.yml b/.github/workflows/docker-deploy.yml new file mode 100644 index 0000000..263e23c --- /dev/null +++ b/.github/workflows/docker-deploy.yml @@ -0,0 +1,25 @@ +name: Build and Push Docker image + +on: + push: + branches: + - main # Set to your default branch + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - name: Check Out Repo + uses: actions/checkout@v2 + + - name: Log in to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + + - name: Build and Push Docker Image + uses: docker/build-push-action@v2 + with: + push: true + tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKER_IMAGE }}:latest diff --git a/bot_components/bot.py b/bot_components/bot.py index b0f0500..8ecf766 100644 --- a/bot_components/bot.py +++ b/bot_components/bot.py @@ -30,7 +30,7 @@ async def on_guild_join(self, guild): except Exception as e: print(f"Failed to send message to admin: {str(e)}") - @tasks.loop(hours=3) + @tasks.loop(seconds=60) async def scrape_and_post(self): print('Entered scrape_and_post loop') # Add this line for guild in self.guilds: