2022-05-24 16:10:42 +06:00
|
|
|
# https://woodpecker-ci.org/docs/intro
|
|
|
|
|
2024-05-17 09:18:22 +06:00
|
|
|
# https://woodpecker-ci.org/docs/intro
|
|
|
|
|
|
|
|
when:
|
|
|
|
event: [push, manual]
|
|
|
|
branch: main
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: build
|
|
|
|
image: node:18-alpine
|
|
|
|
when:
|
|
|
|
- path:
|
|
|
|
exclude: ['meta/**']
|
|
|
|
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:18:22 +06:00
|
|
|
- s3 cp --recursive ./dist s3://$${S3_BUCKET}/
|
|
|
|
- cloudfront create-invalidation --distribution-id $${CLOUDFRONT_DISTRIBUTION} --paths '/*'
|
|
|
|
secrets:
|
|
|
|
- S3_BUCKET
|
|
|
|
- CLOUDFRONT_DISTRIBUTION
|
|
|
|
- AWS_ACCESS_KEY_ID
|
|
|
|
- AWS_SECRET_ACCESS_KEY
|
|
|
|
- AWS_REGION
|