Skip to content

first

first #1

Workflow file for this run

name: Deploy to DisCloud
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.22.4
- name: Build the Docker image
run: docker build -t mugen_scrapper .
- name: Login to Docker Hub
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin
- name: Push the Docker image
run: docker push mugen_scrapper:latest
- name: Deploy to DisCloud
env:
DISCLOUD_API_KEY: ${{ secrets.DISCLOUD_API_KEY }}
run: |
curl -X POST "https://discloudbot.com/api/v2/app/deploy" \
-H "api-token: $DISCLOUD_API_KEY" \
-F "file=@./Dockerfile" \
-F "file=@./.dockerignore" \
-F "file=@./main"