hydroforth/.drone.yml
Dominic Grimm e3654bda81
Some checks failed
continuous-integration/drone/push Build is failing
Init pages
2023-08-05 17:59:48 +02:00

100 lines
1.9 KiB
YAML

---
kind: pipeline
type: docker
name: default
steps:
- name: build
image: ghcr.io/rikorose/gcc-cmake
commands:
- mkdir build && cd build
- cmake -DCMAKE_BUILD_TYPE=Release ..
- make
- name: docs
image: docker.io/corentinaltepe/doxygen
commands:
- doxygen
- ls docs
depends_on:
- build
- name: rebuild-cache
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
settings:
rebuild: true
mount:
- ./docs/html
depends_on:
- docs
volumes:
- name: cache
host:
path: /tmp/cache
---
kind: pipeline
type: docker
name: deploy-docs
steps:
- name: restore-cache
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
settings:
restore: true
mount:
- ./docs/html
- name: prepare-pages
image: bitnami/git
volumes:
- name: cache
path: /cache
commands:
# - git clone --depth 1 --branch pages https://git.dergrimm.net/mentorenwahl/mentorenwahl.git /tmp/pages_old
# - cp -r /tmp/pages_old/.git /tmp/pages
# - cp -r ./docs/book/* /tmp/pages
# - mkdir -p /tmp/pages/_api/backend
# - cp -r ./backend/docs/* /tmp/pages/_api/backend
- ls -la
- git checkout pages
- shopt -s extglob; rm -rf !(.git)
- ls -la
depends_on:
- restore-cache
# - name: deploy-pages
# image: appleboy/drone-git-push
# volumes:
# - name: pages
# path: /tmp/pages
# settings:
# remote:
# from_secret: deploy_remote
# force: false
# commit: true
# commit_message: "[CI] Deploy pages"
# branch: pages
# local_ref: pages
# path: /tmp/pages
# depends_on:
# - prepare-pages
volumes:
- name: cache
host:
path: /tmp/cache
depends_on:
- default
trigger:
branch:
- main
event:
- push
- promote