publish website when push on main
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
28
.drone.yml
28
.drone.yml
@@ -7,16 +7,34 @@ steps:
|
|||||||
- name: build
|
- name: build
|
||||||
image: docker:dind
|
image: docker:dind
|
||||||
environment:
|
environment:
|
||||||
COMPOSE_PROJECT_NAME: adv-testing-${DRONE_COMMIT_BRANCH//\//-}
|
COMPOSE_PROJECT_NAME: dav-testing-${DRONE_COMMIT_BRANCH//\//-}
|
||||||
NUXT_APP_BASE_URL: /adv/${DRONE_COMMIT_BRANCH}/
|
NUXT_APP_BASE_URL: /${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}/${DRONE_COMMIT_BRANCH}/
|
||||||
SERVICE_3000_CHECK_HTTP: /adv/${DRONE_COMMIT_BRANCH}/
|
SERVICE_3000_CHECK_HTTP: /${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}/${DRONE_COMMIT_BRANCH}/
|
||||||
SERVICE_3000_TAGS: urlprefix-testing.asycn.io/adv/${DRONE_COMMIT_BRANCH}/*
|
SERVICE_3000_TAGS: urlprefix-testing.asycn.io/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}/${DRONE_COMMIT_BRANCH}/*
|
||||||
commands:
|
commands:
|
||||||
- docker compose -f docker/docker-compose.yml -f docker/docker-compose.labels.yml up --build -d
|
- docker compose -f docker/docker-compose.yml -f docker/docker-compose.labels.yml up --build -d
|
||||||
volumes:
|
volumes:
|
||||||
- name: dockersock
|
- name: dockersock
|
||||||
path: /var/run/docker.sock
|
path: /var/run/docker.sock
|
||||||
|
|
||||||
|
- name: publish
|
||||||
|
image: cschlosser/drone-ftps
|
||||||
|
environment:
|
||||||
|
FTP_USERNAME:
|
||||||
|
from_secret: ftp_username
|
||||||
|
FTP_PASSWORD:
|
||||||
|
from_secret: ftp_password
|
||||||
|
PLUGIN_HOSTNAME: open.us.org:21
|
||||||
|
PLUGIN_SRC_DIR: /.output/public/
|
||||||
|
PLUGIN_DEST_DIR: /dav/www/
|
||||||
|
PLUGIN_SECURE: true
|
||||||
|
PLUGIN_VERIFY: false
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
|
||||||
- name: notify
|
- name: notify
|
||||||
image: appleboy/drone-telegram
|
image: appleboy/drone-telegram
|
||||||
when:
|
when:
|
||||||
@@ -35,7 +53,7 @@ steps:
|
|||||||
```
|
```
|
||||||
{{commit.message}}
|
{{commit.message}}
|
||||||
```
|
```
|
||||||
🌐 https://testing.asycn.io/adv/{{commit.branch}}/
|
🌐 https://testing.asycn.io/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}/{{commit.branch}}/
|
||||||
{{else}}
|
{{else}}
|
||||||
❌ Le build #{{build.number}} du repo `{{repo.name}}` est un gros fail...
|
❌ Le build #{{build.number}} du repo `{{repo.name}}` est un gros fail...
|
||||||
📝 Commit de {{commit.email}} sur la branche `{{commit.branch}}`:
|
📝 Commit de {{commit.email}} sur la branche `{{commit.branch}}`:
|
||||||
|
|||||||
@@ -9,9 +9,14 @@ COPY --link ./ ./
|
|||||||
|
|
||||||
FROM build AS master
|
FROM build AS master
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
RUN npm run generate
|
||||||
|
|
||||||
FROM base AS prod
|
FROM base AS prod
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
# COPY --from=build /app/node_modules /app/node_modules
|
# COPY --from=build /app/node_modules /app/node_modules
|
||||||
COPY --from=master /app/.output /app/.output
|
COPY --from=master /app/.output /app/.output
|
||||||
|
COPY --from=master /app/.output/public /drone/src/.output
|
||||||
|
RUN echo app && ls -la /app/.output/
|
||||||
|
RUN echo src && ls -la /drone/src/
|
||||||
|
RUN echo output && ls -la /drone/src/.output
|
||||||
CMD [ "node", ".output/server/index.mjs" ]
|
CMD [ "node", ".output/server/index.mjs" ]
|
||||||
|
|||||||
Reference in New Issue
Block a user