How to deploy to AWS S3 from Codex?

I have a question, maybe a little dumb, I'm trying to deploy a static site with codes, but I can't understand the documentation:

https://codeship.com/documentation/continuous-deployment/deployment-to-aws-codedeploy/

This is currently slightly different from the installation method , I don’t know what to write to the β€œLocal Path” input

enter image description here

+5
source share
1 answer

You must interpret the "Local Path" as a link to the working directory on the virtual machine.

It took me a while to figure this out. You can see this at the cloning stage. You will see something like this.

Cloning at '/home/rof/src/bitbucket.org/<your_user>/<you_repository>'

The path /home/rof/src/bitbucket.org/<your_user>/<you_repository> is what you are looking for.

If you want to load something inside this directory, just concatenate the rest like /home/rof/src/bitbucket.org/<your_user>/<you_repository>/internal/path

For example: You can compile a NodeJs application and compress the dist directory to create an artifact, and then upload it to S3.

That would be so. In your setup commands:

 nvm use 5.6.0 npm install npm run deploy tar -zcvf artifact.tar.gz dist/ mkdir upload/ mv artifact.tar.gz upload/ 

Finally, your "local path": /home/rof/src/bitbucket.org/<your_user>/<you_repository>/upload

Hope this help!

+16
source

Source: https://habr.com/ru/post/1242806/


All Articles