summaryrefslogtreecommitdiff
path: root/.drone.yml
blob: 1531037fc0c5048b1f4353c642d231425b6603e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
kind: pipeline
type: docker
name: deploy_hugo

steps:
- name: build
  image: klakegg/hugo
  environment:
    HUGO_ENVIRONMENT: production
    HUGO_ENV: production

- name: push
  image: debian:bookworm-slim
  environment:
    GIT_PUB:
      from_secret: GIT_SSH_PUBLIC
    GIT_SEC:
      from_secret: GIT_SSH_PRIVATE
  commands:
    - apt-get update
    - apt-get install git -y
    - mkdir ~/.ssh
    - echo "$GIT_PUB" > ~/.ssh/id_ed25519.pub
    - echo "$GIT_PUB" > ~/.ssh/id_ed25519
    - ls
    - git init
    - git add .
    - git commit -m 'comit'
    - git remote add origin 'git@hyang.xyz:hyang/pages.git'
    - git push -f origin