Skip to content

Instantly share code, notes, and snippets.

@eyeccc
Last active May 22, 2019 09:50
Show Gist options
  • Save eyeccc/987f17f7ab26869959aaff4ee97e5541 to your computer and use it in GitHub Desktop.
Save eyeccc/987f17f7ab26869959aaff4ee97e5541 to your computer and use it in GitHub Desktop.
image: my-public-image # any image you want
pipelines:
pull-requests:
'**':
- step:
name: Unit Test and Build
caches:
- node
script:
- yarn --no-progress --pure-lockfile
- yarn run type-check
- yarn test --silent
- yarn build
artifacts:
- builds/**
- step:
name: Deploy
script:
- aws s3 sync ./builds/ s3://s3-bucket-name --quiet
- curl 'https://bitbucket.org/!api/2.0/repositories/$REPO_SLUG/$REPO/pullrequests/$PR_NUMBER/comments/' \
-X POST -u $USER:$TOKEN -H 'Content-Type: application/json' \
-d '{"content":{"raw": "https://preview.link/$BRANCH_NAME"}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment