From 688452b8ee1052547b185ad6f3b3b43ac5aac859 Mon Sep 17 00:00:00 2001 From: Gisle Aune Date: Thu, 18 Mar 2021 13:03:14 +0100 Subject: [PATCH] add .drone.yml --- .drone.yml | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..5bddd80 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,52 @@ +name: namegen5 + +kind: pipeline +type: docker + +steps: + - name: download-samples + image: docker:git + commands: + - git clone https://git.aiterp.net/namegen5/samples + + - name: compile-samples + image rust:1.50.0-slim + depends_on: [download-samples] + environment: + SOURCE_DIR: ../samples + DESTINATION_DIR: output/ + commands: + - cd compiler + - cargo run --release + + - name: website-build + image: node:14.14.0 + depends_on: [compile-samples] + environment: + DEBIAN_FRONTEND: noninteractive + commands: + - apt-get update + - apt-get install -y --no-install-recommends build-essential ca-certificates curl git ssh libssl-dev + - pkg-config + - npm install + - curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable --no-modify-path + - rustup default nightly + - npm run export + - cp __sapper__/build/server/assets/*.wasm __sapper__/export/assets/ + + - name: website-deploy + image: amazon/aws-cli:latest + depends_on: + - website-build + environment: + AWS_ACCESS_KEY_ID: + from_secret: aws_access_key_id + AWS_SECRET_ACCESS_KEY: + from_secret: aws_secret_access_key + AWS_DEFAULT_REGION: + from_secret: aws_region + S3_WEBUI_BUCKET: + from_secret: s3_webui_bucket + commands: + - cd __sapper__/export + - aws s3 sync . s3://$S3_WEBUI_BUCKET