Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add section about common deployment configuration #49

Closed
wants to merge 3 commits into from

Conversation

ggrossetie
Copy link
Contributor

I also remove trailing slash to avoid strange yaml highlighting.

References:
awestruct/awestruct#341
awestruct/awestruct#343

@mojavelinux
Copy link
Member

I'm really happy to see documentation coming in with a feature enhancement. Thanks for setting a good example!

I have one request before merging this in. Would you be willing to convert it to AsciiDoc? I believe strongly that Awestruct can set itself apart (in the upward direction) from other site generators by showing best practices for creating content as well. This file is a good candidate for conversion since it has embedded HTML for content elements, which is a red flag that Markdown is failing the author.

Hopefully it should be pretty straightforward to convert over. For the code listings, I recommend the open-block style:

[source,yaml]
--
profiles:
  development:
  staging:
  production:
    deploy:
      gzip: true
--

...though, if you like fenced code blocks, you are welcome to choose those.

```yaml
profiles:
  development:
  staging:
  production:
    deploy:
      gzip: true
```

We haven't picked one yet, so you'll be trend setting :)

@mojavelinux
Copy link
Member

Here's the first part of the file in AsciiDoc just to give you a head start. Notice I've switched to the sentence-per-line convention to simplify revisions. I've also switch backticks to plus characters, though that change is not absolutely necessary as both work in AsciiDoc.

= Deploy
:page-layout: default
:page-title: deploy
:page-show_header: true

Awestruct provides several automated options to deploy your site, which make publishing easy!

Using Awestruct, you can deploy your site to any of these destinations:

. http://pages.github.com[GitHub Pages]
. an arbitrary server using +rsync+ and +ssh+
. http://aws.amazon.com/s3[Amazon S3]

You use link:/profiles[site profiles], to configure your deployment.
Once you're configured, deploying is just a single command.

 $ awestruct -P production --deploy

== Configuration

In your +_config/site.yml+, you should define a +profiles+ block, and a profile for each deployment environment.
The names are arbitrary.

[source,yaml]
--
profiles:
  development:
  staging:
  production:
    deploy:
      :gzip: true
--

@ggrossetie
Copy link
Contributor Author

The documentation is now in AsciiDoc (bye bye embedded HTML!)

The default render with Asciidoctor looks great. However on my local environment (Awestruct 0.5.0 and Asciidoctor 0.1.2) the default layout of the awestruct.org site is not "picked up".

@mojavelinux
Copy link
Member

Alright!

No need to worry about the layout issues, the website build just needed some upgrading. I took care of the issues this weekend by upgrading Asciidoctor and Awestruct. It looks good on my end!

@mojavelinux
Copy link
Member

Merged in! It will go live when the 0.5.4 release blog goes out.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants