···3838sequoia auth
3939```
40404141-This will store credentials as a dotfile directory inside `$HOME/.config/sequoia`. If you happen to have more than one blog or publication, you can authorize additional accounts. During the initialize phase the CLI will ask which account you want to use.
4141+This will store credentials as a dotfile directory inside `$HOME/.config/sequoia`. If you happen to have more than one blog or publication, you can authorize additional accounts. During the initialize phase the CLI will ask which account you want to use and store the reference to the `sequoia.json` config.
42424343## Initialize
4444
+139-3
docs/docs/pages/workflows.mdx
···11-# Workflows
11+# Workflows
22+33+Sequoia is designed to fit seamlessly into your existing publishing workflow, whether you're running commands locally or automating deploys with CI/CD pipelines.
44+55+## The Publishing Flow
66+77+The typical Sequoia workflow follows these steps:
88+99+::::steps
1010+1111+### Publish
1212+1313+First, publish your markdown content to the AT Protocol. This creates or updates `site.standard.document` records on your PDS.
1414+1515+```bash [Terminal]
1616+sequoia publish
1717+```
1818+1919+This command:
2020+- Scans your content directory for markdown files
2121+- Detects changes using content hashing
2222+- Creates new records for new posts
2323+- Updates existing records for modified posts
2424+- Saves state to `.sequoia-state.json`
2525+2626+### Build
2727+2828+Build your site using your static site generator (SSG) as you normally would.
2929+3030+```bash [Terminal]
3131+# Examples for different frameworks
3232+npm run build # Most frameworks
3333+astro build # Astro
3434+hugo # Hugo
3535+next build # Next.js
3636+```
3737+3838+### Inject (Optional)
3939+4040+After building, inject the AT URI link tags into your HTML files for document verification.
24133-:::warning
44-Under construction
4242+```bash [Terminal]
4343+sequoia inject
4444+```
4545+4646+This adds `<link rel="site.standard.document">` tags to the `<head>` of your built HTML files, enabling aggregators to verify your content.
4747+4848+:::tip
4949+If you prefer manual control, you can skip this step and configure your SSG to read the `atUri` field from frontmatter instead.
550:::
5151+5252+### Deploy
5353+5454+Deploy your built site to your hosting provider as usual.
5555+5656+```bash [Terminal]
5757+# Examples
5858+netlify deploy --prod
5959+vercel --prod
6060+rsync -avz ./dist/ user@server:/var/www/
6161+```
6262+6363+::::
6464+6565+## Environment Variables
6666+6767+Sequoia supports environment variables for automation scenarios like CD/CI.
6868+6969+| Variable | Description |
7070+|----------|-------------|
7171+| `ATP_IDENTIFIER` | Your ATProto handle or DID (e.g., `alice.bsky.social`) |
7272+| `ATP_APP_PASSWORD` | Your ATProto app password |
7373+| `PDS_URL` | Custom PDS URL (optional, auto-resolved from DID if not set) |
7474+| `SEQUOIA_PROFILE` | Name of a stored identity profile to use |
7575+7676+## CI/CD Integration
7777+7878+Sequoia works with any CI/CD platform. Set `ATP_IDENTIFIER` and `ATP_APP_PASSWORD` as secrets in your pipeline.
7979+8080+### GitHub Actions
8181+8282+```yaml [.github/workflows/deploy.yml]
8383+name: Deploy
8484+8585+on:
8686+ push:
8787+ branches: [main]
8888+8989+jobs:
9090+ deploy:
9191+ runs-on: ubuntu-latest
9292+ steps:
9393+ - uses: actions/checkout@v4
9494+9595+ - uses: oven-sh/setup-bun@v2
9696+9797+ - name: Install dependencies
9898+ run: bun install
9999+100100+ - name: Install Sequoia
101101+ run: bun install -g sequoia-cli
102102+103103+ - name: Publish to ATProto
104104+ env:
105105+ ATP_IDENTIFIER: ${{ secrets.ATP_IDENTIFIER }}
106106+ ATP_APP_PASSWORD: ${{ secrets.ATP_APP_PASSWORD }}
107107+ run: sequoia publish
108108+109109+ - name: Build site
110110+ run: bun run build
111111+112112+ - name: Inject link tags
113113+ run: sequoia inject
114114+115115+ - name: Deploy
116116+ # Add your deployment step here
117117+ run: echo "Deploy your ./dist folder"
118118+```
119119+120120+### GitLab CI
121121+122122+```yaml [.gitlab-ci.yml]
123123+stages:
124124+ - deploy
125125+126126+deploy:
127127+ stage: deploy
128128+ image: oven/bun:latest
129129+ script:
130130+ - bun install
131131+ - bun install -g sequoia-cli
132132+ - sequoia publish
133133+ - bun run build
134134+ - sequoia inject
135135+ # Add your deployment command
136136+ only:
137137+ - main
138138+ variables:
139139+ ATP_IDENTIFIER: $ATP_IDENTIFIER
140140+ ATP_APP_PASSWORD: $ATP_APP_PASSWORD
141141+```