ci: test dependency

This commit is contained in:
bdeshi 2024-05-17 10:59:50 +06:00
parent 8befe6d530
commit 4762e1baf9
Signed by: bdeshi
GPG Key ID: 410D03DA9A3468E0
2 changed files with 19 additions and 3 deletions

View File

@ -5,7 +5,7 @@ when:
branch: main
steps:
- name: build
- name: build/yarn
image: node:18
when:
- path:
@ -14,14 +14,14 @@ steps:
- yarn install
- yarn build
- name: publish
- name: publish/s3
image: amazon/aws-cli:2.15.50
commands:
- aws s3 sync --delete ./dist s3://$${S3_BUCKET}/
- 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/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 ]