Hacker News new | past | comments | ask | show | jobs | submit | MatthewK's comments login

Might be a little off-topic but hopefully relevant enough. I'm rather new to web dev but currently have a static website hosted on AWS S3. My current workflow is to code the HTML and CSS files using Sublime Text then upload these files into a bucket manually via the AWS console. Is there a more efficient way to do this? And is there a simple way to enable HTTPS?


If you have multiple HTML pages, using a templating engine saves a lot of copy/pasting when you change headers, menus etc. (in the article they're using Hugo).

You can automate the uploading of files by writing a script to upload the files to the bucket so you can deploy in a single command (it gets trickier if you want to do a sync and delete files).

Personally I use rake [0] to create build and deploy tasks so I can do `rake build` and `rake deploy:prod`.

[0] https://github.com/ruby/rake



For enabling HTTPS, you can put CloudFront in front of it. That'll make it faster, too, and cost almost nothing.

For my static sites, I'm usually doing some form of fancy JavaScript npm / gulp / bower, but then ultimately just uploading those files to S3.

You could probably do it a little faster using the AWS CLI. It can upload a directory to a bucket in one command (while skipping unchanged files).


You can try Scotty.js [1].

[1] https://github.com/stojanovic/scottyjs


Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: