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
67 changes: 67 additions & 0 deletions .github/workflows/site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: site

on:
push:
branches: [master]
paths:
- 'site/**'
- 'docs/**'
- '.github/workflows/site.yml'
pull_request:
branches: [master]
paths:
- 'site/**'
- 'docs/**'
workflow_dispatch:

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

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
name: build
runs-on: ubuntu-24.04
defaults:
run:
working-directory: site
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '22'

- uses: oven-sh/setup-bun@v2
with:
bun-version: '1.3'

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Astro build
env:
NODE_ENV: production
run: bun run build

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: site/dist

deploy:
name: deploy
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-24.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Cargo.lock.old
.vscode/
*.swp
*.swo
.codex

# OS
.DS_Store
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/deploy-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Don't expose `8080` directly. Put Caddy / nginx / Traefik in front for TLS + rat

### Caddy example

```caddy
```txt
mailify.yourdomain.com {
reverse_proxy localhost:8080
encode zstd gzip
Expand Down
6 changes: 6 additions & 0 deletions site/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dist
.astro
node_modules
.env
.env.*
!.env.example
104 changes: 104 additions & 0 deletions site/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
// @ts-check
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import sitemap from '@astrojs/sitemap';

export default defineConfig({
site: 'https://mailify.donilite.me',
trailingSlash: 'never',

integrations: [
starlight({
title: 'Mailify',
description: 'Self-hosted, theme-aware transactional mail server in Rust.',
logo: {
light: './public/logo.png',
dark: './public/logo-white.png',
alt: 'Mailify',
replacesTitle: false,
},
favicon: '/favicon.svg',
customCss: [
'./src/styles/tokens.css',
'./src/styles/global.css',
],
social:[
{ icon: 'github', label: 'GitHub', href: 'https://github.com/donilite/mailify' },
],
editLink: {
baseUrl: 'https://github.com/donilite/mailify/edit/master/',
},
head: [
{
tag: 'meta',
attrs: { property: 'og:image', content: 'https://mailify.donilite.me/og-default.svg' },
},
{
tag: 'meta',
attrs: { name: 'twitter:card', content: 'summary_large_image' },
},
{
tag: 'script',
attrs: { type: 'application/ld+json' },
content: JSON.stringify({
'@context': 'https://schema.org',
'@type': 'SoftwareApplication',
name: 'Mailify',
applicationCategory: 'DeveloperApplication',
operatingSystem: 'Linux, macOS, Windows',
offers: { '@type': 'Offer', price: '0', priceCurrency: 'USD' },
description: 'Self-hosted, theme-aware transactional mail server in Rust.',
url: 'https://mailify.donilite.me',
}),
},
],
sidebar: [
{
label: 'Getting started',
items: [
{ label: 'Overview', link: '/docs' },
{ label: 'Installation', link: '/docs/getting-started/installation' },
{ label: 'Quickstart', link: '/docs/getting-started/quickstart' },
{ label: 'Concepts', link: '/docs/getting-started/concepts' },
],
},
{
label: 'Guides',
items: [
{ label: 'Configure SMTP', link: '/docs/guides/configure-smtp' },
{ label: 'Configure theme', link: '/docs/guides/configure-theme' },
{ label: 'Auth & tokens', link: '/docs/guides/auth-and-tokens' },
{ label: 'Per-job SMTP override', link: '/docs/guides/per-job-smtp-override' },
{ label: 'Deploy with Docker', link: '/docs/guides/deploy-docker' },
],
},
{
label: 'Reference',
items: [
{ label: 'Configuration', link: '/docs/reference/config' },
{ label: 'HTTP API', link: '/docs/reference/http-api' },
{ label: 'CLI', link: '/docs/reference/cli' },
{ label: 'Template contract', link: '/docs/reference/template-contract' },
],
},
{
label: 'Troubleshooting',
items: [
{ label: 'Common errors', link: '/docs/troubleshooting/common-errors' },
{ label: 'FAQ', link: '/docs/troubleshooting/faq' },
{ label: 'Debugging', link: '/docs/troubleshooting/debugging' },
],
},
{
label: 'Contributing',
items: [
{ label: 'Overview', link: '/docs/contributing/overview' },
{ label: 'Architecture', link: '/docs/contributing/architecture' },
{ label: 'Dev setup', link: '/docs/contributing/dev-setup' },
],
},
],
}),
sitemap(),
],
});
Loading
Loading