While having blog powered by pelican is great (because it's fast), creating new post isn't really fun. There are more than one step to do it:
- writing the actual post
- upload to the server (in this case, S3)
If you're on new machine, it's even more painful:
- clone the repository
- install pelican's requirements
- setup S3 credential
- write the actual post
- upload to the server
I found a blog post that gives instruction to do that, but apparently it doesn't work.
s3cmdcouldn't get the access key ID and secret access key I set. Since CircleCi has
awsclipreinstalled, it's better to use that one instead. Pelican doesn't support awscli yet, so there's some steps need to be done to use that.
- update your
- insert your AWS S3 access key ID, and secret key ID
- create circle.yml in your repository
Here's how the circle.yml should be:
dependencies: override: - pip install -r requirements.txt - echo -e "[default] \naccess_key = $S3CFG_ACCESS_KEY \nsecret_key = $S3CFG_SECRET_KEY \n" > /home/ubuntu/.s3cfg test: override: - echo "test" deployment: aws: branch: master commands: - make html - make s3_upload
Now, everytime you push your commits to master, CircleCI will deploy them to S3. You should be able to see the deployment progress on you CircleCI dashboard.
You don't need to create special environment to install pelican etc, just git and text-editor. You could even use github's feature to create blog post directly inside your browser (I wrote this using that!).— 20161128 – aldi —