From fdcfaea7daf07577fc261c871a0176a771b8809a Mon Sep 17 00:00:00 2001 From: makeit Date: Wed, 7 Aug 2024 14:02:15 +0800 Subject: [PATCH] drone.yml & ads --- .drone.yml | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ public/ads.txt | 1 + 2 files changed, 54 insertions(+) create mode 100644 .drone.yml create mode 100644 public/ads.txt diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..258f484 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,53 @@ +kind: pipeline +type: docker +name: makeit-graffiti + +steps: + - name: 'build' + image: node:14 + volumes: + - name: node_modules_cache + path: /drone/src/node_modules + commands: + - pwd + - ls -al + - npm config set registry https://registry.npmmirror.com/ + - npm i + - npm run build + + - name: 'copy' + image: appleboy/drone-scp + settings: + host: + from_secret: secret_host + username: + from_secret: secret_username + password: + from_secret: secret_password + port: 22 + source: ./dist/* + target: /makeit/web/graffiti + + - name: 'deploy' + image: appleboy/drone-ssh + settings: + host: + from_secret: secret_host + username: + from_secret: secret_username + password: + from_secret: secret_password + port: 22 + command_timeout: 3m + script: + - echo '====== deploy start ======' + - cd /makeit/web/graffiti + - rm -rf index.html favicon.ico ads.txt js css fonts img + - mv ./dist/* ./ + - rm -rf dist + - echo '====== deploy success ======' + +volumes: + - name: node_modules_cache + host: + path: /makeit/web/drone/node_modules \ No newline at end of file diff --git a/public/ads.txt b/public/ads.txt new file mode 100644 index 0000000..6d16fef --- /dev/null +++ b/public/ads.txt @@ -0,0 +1 @@ +google.com, pub-7641518914657853, DIRECT, f08c47fec0942fa0