The namegen5 website.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.6 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. name: namegen5
  2. kind: pipeline
  3. type: docker
  4. steps:
  5. - name: download-samples
  6. image: docker:git
  7. commands:
  8. - git clone https://git.aiterp.net/namegen5/samples
  9. - name: compile-samples
  10. image: rust:1.50.0-slim
  11. depends_on: [download-samples]
  12. environment:
  13. SOURCE_DIR: ../samples
  14. DESTINATION_DIR: output/
  15. commands:
  16. - cd compiler
  17. - mkdir output/
  18. - cargo run --release
  19. - name: website-build
  20. image: node:14.14.0
  21. depends_on: [compile-samples]
  22. environment:
  23. DEBIAN_FRONTEND: noninteractive
  24. commands:
  25. - apt-get update
  26. - apt-get install -y --no-install-recommends build-essential ca-certificates curl git ssh libssl-dev
  27. - curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable --no-modify-path
  28. - . $HOME/.cargo/env
  29. - npm install
  30. - npm run export
  31. - mkdir __sapper__/export/assets
  32. - cp __sapper__/build/server/assets/*.wasm __sapper__/export/assets/
  33. - name: website-deploy
  34. image: amazon/aws-cli:latest
  35. depends_on:
  36. - website-build
  37. environment:
  38. AWS_ACCESS_KEY_ID:
  39. from_secret: aws_access_key_id
  40. AWS_SECRET_ACCESS_KEY:
  41. from_secret: aws_secret_access_key
  42. AWS_DEFAULT_REGION:
  43. from_secret: aws_region
  44. S3_WEBUI_BUCKET:
  45. from_secret: s3_webui_bucket
  46. CF_DISTRIBUTION_ID:
  47. from_secret: cf_distribution_id
  48. commands:
  49. - cd __sapper__/export
  50. - aws s3 sync --delete . s3://$S3_WEBUI_BUCKET
  51. - aws cloudfront create-invalidation --distribution-id $CF_DISTRIBUTION_ID --paths "/*"