refactor: remove drone and gitlab ci configurations
All checks were successful
Hugo Publish CI / build-and-deploy (push) Successful in 25s
All checks were successful
Hugo Publish CI / build-and-deploy (push) Successful in 25s
The previous CI/CD configurations for Drone and GitLab CI are no longer needed. This commit removes these files as the project will now rely on a different CI/CD solution.
This commit is contained in:
72
.drone.yml
72
.drone.yml
@@ -1,72 +0,0 @@
|
||||
kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: git-clone
|
||||
image: alpine/git
|
||||
environment:
|
||||
SSH_KEY:
|
||||
from_secret: ssh_key
|
||||
volumes:
|
||||
- name: output
|
||||
path: /output
|
||||
commands:
|
||||
- mkdir -p $HOME/.ssh
|
||||
- echo "$SSH_KEY" > $HOME/.ssh/id_rsa
|
||||
- chmod 400 $HOME/.ssh/id_rsa
|
||||
- ssh-keyscan -H git.ericxliu.me > $HOME/.ssh/known_hosts
|
||||
- git clone --branch gitea-pages git@git.ericxliu.me:eric/ericxliu-me.git /output
|
||||
- find /output -mindepth 1 -not -regex "^.*\/.git\/.*" -delete
|
||||
- name: submodules
|
||||
image: alpine/git
|
||||
commands:
|
||||
- git submodule update --init --recursive
|
||||
- name: build
|
||||
image: plugins/hugo
|
||||
volumes:
|
||||
- name: output
|
||||
path: /output
|
||||
settings:
|
||||
hugo_version: 0.97.0
|
||||
extended: true
|
||||
minify: true
|
||||
url: "https://ericxliu.me"
|
||||
validate: false
|
||||
output: /output
|
||||
- name: add-commit-hash
|
||||
image: alpine/git
|
||||
volumes:
|
||||
- name: output
|
||||
path: /output
|
||||
commands:
|
||||
- sed -i 's/\[commit\]/\[${DRONE_COMMIT_SHA:0:7}\]/g' /output/index.html
|
||||
- name: git-push
|
||||
image: appleboy/drone-git-push:0.2.0-linux-amd64
|
||||
volumes:
|
||||
- name: output
|
||||
path: /output
|
||||
settings:
|
||||
branch: gitea-pages
|
||||
remote: "git@git.ericxliu.me:eric/ericxliu-me.git"
|
||||
force: true
|
||||
commit: true
|
||||
path: /output
|
||||
commit_message: "Drone build ${DRONE_COMMIT_SHA:0:7}"
|
||||
author_name: "Eric Liu"
|
||||
author_email: "eric@ericxliu.me"
|
||||
ssh_key:
|
||||
from_secret: ssh_key
|
||||
- name: k8s-delete-pod
|
||||
image: alpine/curl
|
||||
environment:
|
||||
TOKEN:
|
||||
from_secret: token
|
||||
APISERVER: "https://10.10.0.10:6443"
|
||||
commands:
|
||||
- "curl -X DELETE $APISERVER/api/v1/namespaces/hugo/pods/ --header \"Authorization: Bearer $TOKEN\" --insecure"
|
||||
volumes:
|
||||
- name: output
|
||||
temp: {}
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
@@ -1,37 +0,0 @@
|
||||
# This file is a template, and might need editing before it works on your project.
|
||||
# To contribute improvements to CI/CD templates, please follow the Development guide at:
|
||||
# https://docs.gitlab.com/ee/development/cicd/templates.html
|
||||
# This specific template is located at:
|
||||
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Pages/HTML.gitlab-ci.yml
|
||||
|
||||
# Full project: https://gitlab.com/pages/plain-html
|
||||
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
|
||||
build-stage:
|
||||
stage: build
|
||||
image: monachus/hugo:latest
|
||||
script:
|
||||
- hugo
|
||||
- ls
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
|
||||
deploy-stage:
|
||||
stage: deploy
|
||||
image: minio/mc:latest
|
||||
script:
|
||||
- ls
|
||||
- mkdir .public
|
||||
- cp -r public/* .public
|
||||
- mc alias set minio http://minio.diskstation.local:80 WjaYWk3uthUlotbT Hc3fff7v69nZ6XvcXXpOZ3JJMzcmGc6A
|
||||
- mc cp -r .public/ minio/eric-personal
|
||||
artifacts:
|
||||
paths:
|
||||
- .public
|
||||
dependencies:
|
||||
- build-stage
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
Reference in New Issue
Block a user