Skip to content

Commit

Permalink
add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
cornelcroi committed Aug 17, 2024
1 parent d844a76 commit 0a743e9
Show file tree
Hide file tree
Showing 47 changed files with 9,224 additions and 270 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/on-docs-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build and Deploy Documentation

on:
push:
branches:
- main
paths:
- 'docs/**'
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

jobs:
# Build the documentation.
build:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08
- name: Install, build, and upload documentation
uses: withastro/action@9a7959a16949e620a22e74f81c10cb7ce3b76924
with:
path: ./docs
- name: Upload artifact
uses: actions/upload-pages-artifact@027b0ddc3de8dbe7e5a699814c4508ca8ecefc5f
with:
path: ./docs/dist

# Deploy the documentation to GitHub Pages.
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@7a9bd943aa5e5175aeb8502edcc6c1c02d398e10
339 changes: 69 additions & 270 deletions README.md

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# build output
dist/
# generated types
.astro/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*


# environment variables
.env
.env.production

# macOS-specific files
.DS_Store
34 changes: 34 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<br>

<p align="center">
<p align="center">
<img src="https://astro.badg.es/v2/built-with-starlight/tiny.svg">
</p>
</p>
<br>

## 🚀 Run

To run the documentation locally, clone the repository and run:


```bash
npm run dev
```

## 🧞 Commands

All commands are run from the root of the project, from a terminal:

| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |

## 👀 Want to learn more?

Check out [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat).
88 changes: 88 additions & 0 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';

// https://astro.build/config
export default defineConfig({
site: process.env.ASTRO_SITE,
base: '/cloudfront-hosting-toolkit',
markdown: {
gfm: true
},
integrations: [
starlight({
title: 'Cloudfront Hosting Toolkit',
description: 'open source command line tool to help developers deploy fast and secure frontends in the cloud 🤖🚀',
defaultLocale: 'en',
favicon: '/src/assets/favicon.ico',
customCss: [
'./src/styles/landing.css',
'./src/styles/font.css',
'./src/styles/custom.css',
'./src/styles/terminal.css'
],
social: {
github: 'https://github.com/awslabs/cloudfront-hosting-toolkit'
},
"sidebar": [
{
"label": "Getting Started",
"items": [
{ "label": "Introduction", "link": "/getting-started/introduction" },
{ "label": "Quickstart", "link": "/getting-started/quickstart" },
{ "label": "How It Works", "link": "/getting-started/how-it-works" }
]
},
{
"label": "Architecture",
"items": [
{ "label": "Overview", "link": "/architecture/overview" },
{ "label": "GitHub Workflow", "link": "/architecture/github-workflow" },
{ "label": "S3 Workflow", "link": "/architecture/s3-workflow" }
]
},
{
"label": "User Guide",
"items": [
{ "label": "CLI Guide", "link": "/user-guide/cli-guide" },
{ "label": "CDK Integration", "link": "/user-guide/cdk-integration" }
]
},
{
"label": "Features",
"items": [
{ "label": "Overview", "link": "/features/overview" },
{ "label": "Self-paced Setup Wizard", "link": "/features/setup-wizard" },
{ "label": "Instant Deployment", "link": "/features/instant-deployment" },
{ "label": "GitHub Integration", "link": "/features/github-integration" },
{ "label": "Optimized Caching", "link": "/features/optimized-caching" },
{ "label": "Enhanced Security Headers", "link": "/features/security-headers" },
{ "label": "Custom Domain Support", "link": "/features/custom-domains" },
{ "label": "SSL/TLS Management", "link": "/features/ssl-tls-management" }
]
},
{
"label": "Advanced Usage",
"items": [
{ "label": "Advanced Configuration", "link": "/advanced/configuration" },
{ "label": "Custom Frameworks", "link": "/advanced/custom-frameworks" },
{ "label": "Bring Your Own Framework", "link": "/advanced/bring-your-own-framework" },
{ "label": "Manual Deployment", "link": "/advanced/manual-deployment" }
]
},
{
"label": "Troubleshooting",
"items": [
{ "label": "Troubleshooting Guide", "link": "/troubleshooting/guide" }
]
},
{
"label": "Project Info",
"items": [
{ "label": "FAQ", "link": "/project/faq" },
]
}
]

})
]
});
Loading

0 comments on commit 0a743e9

Please sign in to comment.