ci: test dependency

This commit is contained in:
2024-05-17 10:59:50 +06:00
parent 8befe6d530
commit 4762e1baf9
2 changed files with 19 additions and 3 deletions

27
.woodpecker/build.yml Normal file
View File

@ -0,0 +1,27 @@
# https://woodpecker-ci.org/docs/intro
when:
event: [push, manual]
branch: main
steps:
- name: build/yarn
image: node:18
when:
- path:
exclude: ['_meta/**']
commands:
- yarn install
- yarn build
- name: publish/s3
image: amazon/aws-cli:2.15.50
commands:
- aws s3 sync --delete ./dist s3://$${S3_BUCKET}/
secrets:
- S3_BUCKET
- CLOUDFRONT_DISTRIBUTION
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_REGION
depends_on: [ build/yarn ]

16
.woodpecker/refresh.yml Normal file
View File

@ -0,0 +1,16 @@
when:
event: [push, manual]
branch: main
steps:
- name: publish/cloudfront
image: amazon/aws-cli:2.15.50
commands:
- aws cloudfront create-invalidation --distribution-id $${CLOUDFRONT_DISTRIBUTION} --paths '/*'
secrets:
- S3_BUCKET
- CLOUDFRONT_DISTRIBUTION
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_REGION
depends_on: [ build ]