Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deploy to GitHub Pages

on:
# Trigger the workflow every time you push to the `main` branch
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:

# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@v4
- name: Install, build, and upload your site
uses: withastro/action@v3

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@v4
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,26 @@ Follow these steps in every new docs repository.
- [ ] "GitHub Actions" as source
- [ ] Add DNS config in AWS Route 53
- [ ] Add custom domain in GitHub
- [ ] Enable "Enforce HTTPS"
- [ ] Create a pull request
- [ ] Update the title in the README
- [ ] Update the URL in the README
- [ ] Update `astro.config.mjs` with appropriate configuration
- [ ] Update `src/content/docs/index.mdx` with appropriate information
- [ ] Update `public/site.webmanifest` with appropriate information
- [ ] Update `package.json` with project name
- [ ] Add any initial content
- [ ] Remove the "New Project Checklist" from the README
- [ ] Merge the pull request
- [ ] Verify that deployment is successful
- [ ] Enable "Enforce HTTPS" in the GitHub pages settings (it does not seem you can do it until you have a deployment)

## Project Structure

Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.

Images can be added to `src/assets/` and embedded in Markdown with a relative link.

Static assets, like favicons, can be placed in the `static/` directory.
Static assets, like favicons, can be placed in the `public/` directory.

## Commands

Expand All @@ -40,4 +41,4 @@ All commands are run from the root of the project, from a terminal:
| :-------------- | :------------------------------------------ |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./public/` |
| `npm run build` | Build your production site to `dist/` |
3 changes: 2 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "Docs Template",
"private": true,
"type": "module",
"scripts": {
Expand Down