-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.06 KB
/
deploy.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
34
35
36
37
38
39
40
41
42
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"