summaryrefslogtreecommitdiff
path: root/.drone.yml
blob: 98e240222e09d09928cd9169ba00f9b6131bb567 (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
32
33
34
35
36
kind: pipeline
type: docker
name: deploy_hugo

steps:
- name: submodules
  image: alpine/git
  commands:
  - git submodule update --init --recursive

- name: build
  image: klakegg/hugo:ci

- name: push
  image: 3gigs/git-push
  environment:
    GIT_SSH_KEY:
      from_secret: GIT_SSH_PRIVATE
    GIT_SSH_COMMAND: ssh -o StrictHostKeyChecking=no
  commands:
    - mkdir ~/.ssh
    - umask 077
    - echo "$GIT_SSH_KEY" > ~/.ssh/id_ed25519
    - umask 000
    - cd public
    - git config init.defaultBranch master
    - git init
    - git remote add origin git@hyang.xyz:hyang/pages.git
    - git add .
    - git commit -m '[ci] deploy'
    - git push -f -u origin master
 
- name: bing
  image: curlimages/curl
  commands:
    - curl -X PUT https://hyang.xyz