Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (25 sloc) 1.02 KB
language: node_js
node_js:
- node
script:
- npm run lint
- npm test
- npm run build
- echo "Folder name in Digital Ocean Spaces - $TRAVIS_COMMIT"
- mkdir -p dist/@openmrs/esm-root-config/$TRAVIS_COMMIT
- mv dist/*.* dist/@openmrs/esm-root-config/$TRAVIS_COMMIT/
deploy:
provider: s3
access_key_id: "$DIGITAL_OCEAN_SPACES_KEY_ID"
secret_access_key: "$DIGITAL_OCEAN_SPACES_ACCESS_KEY"
bucket: "$DIGITAL_OCEAN_SPACES_BUCKET"
endpoint: "$DIGITAL_OCEAN_SPACES_ENDPOINT"
cache-control: "max-age=31536000"
local_dir: dist
skip_cleanup: true
acl: public_read
on:
branch: master
after_deploy:
- echo "Updating import map to point to new version of @openmrs/esm-root-config"
- curl -u $DEPLOYER_USERNAME:$DEPLOYER_PASSWORD -d '{ "service":"@openmrs/esm-root-config","url":"https://spa-modules.nyc3.digitaloceanspaces.com/@openmrs/esm-root-config/'$TRAVIS_COMMIT'/openmrs-esm-root-config.defaults.js" }' -X PATCH $DEPLOYER_HOST/services\?env=prod -H "Accept:application/json" -H "Content-Type:application/json" --fail
You can’t perform that action at this time.