summaryrefslogtreecommitdiff
path: root/.drone.yml
blob: a6b4e1f17d8bc50c7afa51e698a3adb2e125a9fe (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
kind: pipeline
type: docker
name: deploy_hugo

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

- name: push
  image: debian
  environment:
    GIT_SSH_KEY:
      from_secret: GIT_SSH_PRIVATE
  commands:
    - mkdir ~/.ssh
    - echo "$GIT_SSH_KEY" > ~/.ssh/id_ed25519
    - apt-get update && apt-get install git -y
    - pushd public
    - git init
    - git remote add origin git@hyang.xyz:hyang/hyang.xyz.git
    - git add .
    - git commit -m '[ci] deploy'
    - git push -f -u origin master