Deploy — dsa.debwashis.com¶
এই সাইটের ঠিকানা dsa.debwashis.com। Repository-তে Cloudflare Workers-এর Git integration যুক্ত আছে। MkDocs HTML তৈরি করে; Cloudflare Worker সেই static file-গুলো serve করে।
বর্তমান deployment-এর গঠন¶
| অংশ | কাজ |
|---|---|
mkdocs.yml |
Markdown থেকে _site/ তৈরি করে; canonical URL হলো https://dsa.debwashis.com/ |
wrangler.jsonc |
dsa-lessons Worker-এর static assets directory হিসেবে _site ব্যবহার করে |
| Cloudflare Workers Builds | GitHub-এর production branch থেকে build ও deploy করে |
.github/workflows/check-docs.yml |
Pull request এবং main/master push-এ strict build ও generated-site check চালায় |
GitHub Actions-এর কাজ এখানে validation। GitHub Pages-এ deployment চালানোর প্রয়োজন নেই। পুরোনো actions/deploy-pages workflow সরানো হয়েছে, কারণ repository-তে Pages enabled ছিল না; তাই HTML build সফল হলেও তার আলাদা deploy job 404 দিচ্ছিল।
Cloudflare build settings¶
বিদ্যমান dsa-lessons Worker-এর Settings → Build-এ নিচের মানগুলোর সঙ্গে configured settings মিলিয়ে নিন:
| Setting | মান |
|---|---|
| Git repository | definito/dsa-lessons |
| Production branch | main |
| Root directory | Repository root |
| Build command | python -m pip install -r requirements.txt && python -m mkdocs build --strict && python scripts/check_site.py |
| Deploy command | npx wrangler deploy |
| Static assets directory | _site — wrangler.jsonc-এ নির্ধারিত |
| Python version | 3.12 — repository-র .python-version অনুযায়ী |
Workers Builds-এর build command dashboard-এ configured থাকে; Wrangler-এর build.command setting দিয়ে সেটি নির্ধারণ করা যায় না। Cloudflare-এর build configuration দেখুন।
বিদ্যমান custom domain dsa.debwashis.com ওই Worker-এর সঙ্গে যুক্ত থাকতে হবে। Domain বা DNS বদলানোর প্রয়োজন হলে আগে বর্তমান mapping দেখুন। এই সংশোধনে domain routing বদলানো হয়নি।
Merge ও verification¶
- Pull Request-এর Check learning site / verify সফল হয়েছে কি না দেখুন।
main-এ merge হলে Cloudflare-এর Workers Builds: dsa-lessons check দেখুন। GitHub-এর validation ও Cloudflare-এর deployment আলাদা check।- Cloudflare build সফল হলে live site খুলুন। Chapter navigation, বাংলা font, graph, search ও Markdown download যাচাই করুন।
- Build ব্যর্থ হলে Cloudflare build log-এর প্রথম error দেখুন। GitHub Pages settings পরিবর্তন করলে Cloudflare build-এর ত্রুটি ঠিক হবে না।
আগের failed workflow run history-তে লালই থাকবে। সংশোধনের পরে নতুন commit-এর check-টি দেখুন।
Local verification¶
python -m pip install -r requirements.txt
python -m mkdocs build --strict
python scripts/check_site.py
python -m mkdocs serve
পুরো _site/-এ font, Markdown source, ZIP, search index ও lesson HTML থাকে। Directory-টির কেবল index.html upload করলে সাইটের বাকি অংশ কাজ করবে না।
আরও নির্দেশনা: লোকাল preview · যাচাই ও নোট লেখার নিয়ম।