|
|
@ -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 |