diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..4c21e77 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,46 @@ +kind: pipeline +name: default + +steps: + - name: build_stable + image: node:20-alpine + commands: + - git clone https://github.com/cheeaun/phanpy.git + - cd phanpy + - git checkout 2023.12.13.19da64a + - npm install + - npm run build + - cp dist ../output + when: + branch: + - main + + # stable site + - name: docker_stable + image: plugins/docker + settings: + repo: docker.data.coop/data-coop-phanpy + registry: docker.data.coop + username: + from_secret: DOCKER_USERNAME + password: + from_secret: DOCKER_PASSWORD + tags: + - "${DRONE_BUILD_NUMBER}" + - "stable" + when: + branch: + - main + event: + exclude: + - pull_request + + - name: notify + image: plugins/matrix + settings: + homeserver: https://data.coop + roomid: plKSghHbepWeUEtbHE:data.coop + username: + from_secret: matrix_username + password: + from_secret: matrix_password diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3fe65dc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM nginx:alpine +EXPOSE 80 +COPY output/ /usr/share/nginx/html diff --git a/Dockerfile_phanpy b/Dockerfile_phanpy new file mode 100644 index 0000000..1003ff1 --- /dev/null +++ b/Dockerfile_phanpy @@ -0,0 +1,15 @@ +FROM node:20-alpine + +RUN apk add git + +RUN cd / && \ + git clone https://github.com/cheeaun/phanpy.git && \ + cd phanpy && \ + git checkout 2023.12.13.19da64a + +# builds to /phanpy/dist +RUN cd /phanpy && \ + npm install && \ + npm run build + +CMD cp /phanpy/dist /mnt