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

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

- 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
    - apt-get update && apt-get install git -y
    - cd public
    - 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 hyang.xyz