aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--Dockerfile23
-rw-r--r--build.yml28
3 files changed, 29 insertions, 25 deletions
diff --git a/.gitignore b/.gitignore
index 07bb2e2..1900427 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,6 @@
.pytest_cache/
-.venv/
-.idea/
__pycache__/
+dist/
.coverage
cobertura.xml
diff --git a/Dockerfile b/Dockerfile
deleted file mode 100644
index a2f6ed8..0000000
--- a/Dockerfile
+++ /dev/null
@@ -1,23 +0,0 @@
-FROM python:3-alpine as poetry
-
-RUN apk add poetry
-COPY poetry.lock .
-COPY pyproject.toml .
-RUN poetry export -f requirements.txt --output requirements.txt
-
-
-
-FROM python:3-alpine
-
-RUN apk add --no-cache ffmpeg
-
-WORKDIR /opt
-
-COPY --from=poetry requirements.txt .
-RUN pip install -r requirements.txt
-
-ADD importer importer
-ADD main.py .
-
-
-ENTRYPOINT python main.py
diff --git a/build.yml b/build.yml
new file mode 100644
index 0000000..14a8411
--- /dev/null
+++ b/build.yml
@@ -0,0 +1,28 @@
+# this build is meant to be submitted manually
+image: alpine/latest
+packages:
+ - python3-dev
+ - python3-setuptools_scm
+ - py3-poetry
+
+sources:
+ - https://git.sr.ht/~gabrielgio/reddit-nextcloud-importer
+
+secrets:
+ - 008c4f67-b864-47f8-9790-cd32f2ae8516
+
+environment:
+ deploy: builds@gabrielgio.me
+ target: artifacts.gabrielgio.me/reddit-nextcloud-importer/
+ version: v0.1.1
+
+tasks:
+ - archive: |
+ cd reddit-nextcloud-importer
+ poetry build
+
+ - deploy: |
+ cd reddit-nextcloud-importer/dist/
+ sshopts="ssh -o StrictHostKeyChecking=no"
+ rsync --rsh="$sshopts" -rP *.tar.* $deploy:/var/www/$target
+