This commit is contained in:
parent
1eb285dc63
commit
bbf5826b0f
32
.drone.yml
32
.drone.yml
@ -1,38 +1,12 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: exec
|
||||
name: build image
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
commands:
|
||||
- docker build . -t git.lulzette.ru/lulzette/geeksstuffwiki:latest
|
||||
- name: login
|
||||
commands:
|
||||
- docker login git.lulzette.ru -u lulzette -p $gitea_key
|
||||
environment:
|
||||
gitea_key:
|
||||
from_secret: gitea_key
|
||||
- name: push
|
||||
commands:
|
||||
- docker push git.lulzette.ru/lulzette/geeksstuffwiki:latest
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: exec
|
||||
name: deploy
|
||||
|
||||
steps:
|
||||
- name: Run image
|
||||
commands:
|
||||
- docker run --name docs -p 8000:8000 -d git.lulzette.ru/lulzette/geeksstuffwiki:latest
|
||||
- name: Make
|
||||
commands:
|
||||
- make
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- promote
|
||||
target:
|
||||
- production
|
||||
node:
|
||||
target: geeksstuffwiki
|
||||
depends_on:
|
||||
- build image
|
@ -1,6 +0,0 @@
|
||||
FROM alpine:3.16.3
|
||||
RUN apk update && apk add py-pip make
|
||||
COPY . /app
|
||||
RUN cd /app && make prepare && make build
|
||||
CMD [ "/app/docker-entry.sh" ]
|
||||
EXPOSE 8000
|
11
Makefile
11
Makefile
@ -1,4 +1,9 @@
|
||||
all: build serve
|
||||
|
||||
local_build: prepare build upload_to_srv clean
|
||||
|
||||
drone_build: prepare build copy_to_dir unprepare clean
|
||||
|
||||
build:
|
||||
mkdocs build
|
||||
clean:
|
||||
@ -9,6 +14,10 @@ unprepare:
|
||||
pip uninstall mkdocs mkdocs-windmill-dark
|
||||
serve:
|
||||
mkdocs serve
|
||||
upload: prepare build upload_to_srv clean
|
||||
|
||||
upload_to_srv:
|
||||
rsync -a -P --delete `pwd`/site/ geekwiki:/srv/http/
|
||||
|
||||
copy_to_dir:
|
||||
cp -r /srv/http /srv/http_${DRONE_BUILD_NUMBER}
|
||||
rsync -a -P --delete `pwd`/site/ /srv/http/
|
||||
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd /app
|
||||
mkdocs serve
|
Loading…
Reference in New Issue
Block a user