2022-05-24 16:10:42 +06:00
|
|
|
# https://woodpecker-ci.org/docs/intro
|
|
|
|
|
2024-05-17 09:18:22 +06:00
|
|
|
when:
|
|
|
|
event: [push, manual]
|
|
|
|
branch: main
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: build
|
2024-05-17 09:30:12 +06:00
|
|
|
image: node:18
|
2024-05-17 09:18:22 +06:00
|
|
|
when:
|
|
|
|
- path:
|
2024-05-17 10:05:29 +06:00
|
|
|
exclude: ['_meta/**']
|
2024-05-17 09:18:22 +06:00
|
|
|
commands:
|
2024-05-17 09:21:40 +06:00
|
|
|
- yarn install
|
2024-05-17 09:18:22 +06:00
|
|
|
- yarn build
|
|
|
|
|
|
|
|
- name: publish
|
|
|
|
image: amazon/aws-cli:2.15.50
|
2022-05-24 16:10:42 +06:00
|
|
|
commands:
|
2024-05-17 09:59:30 +06:00
|
|
|
- aws s3 sync --delete ./dist s3://$${S3_BUCKET}/
|
2024-05-17 09:32:57 +06:00
|
|
|
- aws cloudfront create-invalidation --distribution-id $${CLOUDFRONT_DISTRIBUTION} --paths '/*'
|
2024-05-17 09:18:22 +06:00
|
|
|
secrets:
|
|
|
|
- S3_BUCKET
|
|
|
|
- CLOUDFRONT_DISTRIBUTION
|
|
|
|
- AWS_ACCESS_KEY_ID
|
|
|
|
- AWS_SECRET_ACCESS_KEY
|
|
|
|
- AWS_REGION
|