···38sequoia auth
39```
4041-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.
4243## Initialize
44
···38sequoia auth
39```
4041+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.
4243## Initialize
44
+139-3
docs/docs/pages/workflows.mdx
···1-# Workflows
00000000000000000000000000000000000000023-:::warning
4-Under construction
0000005:::
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
···1+# Workflows
2+3+Sequoia is designed to fit seamlessly into your existing publishing workflow, whether you're running commands locally or automating deploys with CI/CD pipelines.
4+5+## The Publishing Flow
6+7+The typical Sequoia workflow follows these steps:
8+9+::::steps
10+11+### Publish
12+13+First, publish your markdown content to the AT Protocol. This creates or updates `site.standard.document` records on your PDS.
14+15+```bash [Terminal]
16+sequoia publish
17+```
18+19+This command:
20+- Scans your content directory for markdown files
21+- Detects changes using content hashing
22+- Creates new records for new posts
23+- Updates existing records for modified posts
24+- Saves state to `.sequoia-state.json`
25+26+### Build
27+28+Build your site using your static site generator (SSG) as you normally would.
29+30+```bash [Terminal]
31+# Examples for different frameworks
32+npm run build # Most frameworks
33+astro build # Astro
34+hugo # Hugo
35+next build # Next.js
36+```
37+38+### Inject (Optional)
39+40+After building, inject the AT URI link tags into your HTML files for document verification.
4142+```bash [Terminal]
43+sequoia inject
44+```
45+46+This adds `<link rel="site.standard.document">` tags to the `<head>` of your built HTML files, enabling aggregators to verify your content.
47+48+:::tip
49+If you prefer manual control, you can skip this step and configure your SSG to read the `atUri` field from frontmatter instead.
50:::
51+52+### Deploy
53+54+Deploy your built site to your hosting provider as usual.
55+56+```bash [Terminal]
57+# Examples
58+netlify deploy --prod
59+vercel --prod
60+rsync -avz ./dist/ user@server:/var/www/
61+```
62+63+::::
64+65+## Environment Variables
66+67+Sequoia supports environment variables for automation scenarios like CD/CI.
68+69+| Variable | Description |
70+|----------|-------------|
71+| `ATP_IDENTIFIER` | Your ATProto handle or DID (e.g., `alice.bsky.social`) |
72+| `ATP_APP_PASSWORD` | Your ATProto app password |
73+| `PDS_URL` | Custom PDS URL (optional, auto-resolved from DID if not set) |
74+| `SEQUOIA_PROFILE` | Name of a stored identity profile to use |
75+76+## CI/CD Integration
77+78+Sequoia works with any CI/CD platform. Set `ATP_IDENTIFIER` and `ATP_APP_PASSWORD` as secrets in your pipeline.
79+80+### GitHub Actions
81+82+```yaml [.github/workflows/deploy.yml]
83+name: Deploy
84+85+on:
86+ push:
87+ branches: [main]
88+89+jobs:
90+ deploy:
91+ runs-on: ubuntu-latest
92+ steps:
93+ - uses: actions/checkout@v4
94+95+ - uses: oven-sh/setup-bun@v2
96+97+ - name: Install dependencies
98+ run: bun install
99+100+ - name: Install Sequoia
101+ run: bun install -g sequoia-cli
102+103+ - name: Publish to ATProto
104+ env:
105+ ATP_IDENTIFIER: ${{ secrets.ATP_IDENTIFIER }}
106+ ATP_APP_PASSWORD: ${{ secrets.ATP_APP_PASSWORD }}
107+ run: sequoia publish
108+109+ - name: Build site
110+ run: bun run build
111+112+ - name: Inject link tags
113+ run: sequoia inject
114+115+ - name: Deploy
116+ # Add your deployment step here
117+ run: echo "Deploy your ./dist folder"
118+```
119+120+### GitLab CI
121+122+```yaml [.gitlab-ci.yml]
123+stages:
124+ - deploy
125+126+deploy:
127+ stage: deploy
128+ image: oven/bun:latest
129+ script:
130+ - bun install
131+ - bun install -g sequoia-cli
132+ - sequoia publish
133+ - bun run build
134+ - sequoia inject
135+ # Add your deployment command
136+ only:
137+ - main
138+ variables:
139+ ATP_IDENTIFIER: $ATP_IDENTIFIER
140+ ATP_APP_PASSWORD: $ATP_APP_PASSWORD
141+```