Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: create and deploy docs website #22

Merged

Conversation

LayZeeDK
Copy link
Contributor

@LayZeeDK LayZeeDK commented Aug 11, 2022

References

Documentation

  • Create docs website using Docusaurus
  • Brand Docusaurus theme
  • Add logo and favicon
  • List features on home page
  • Add StackBlitz link to home page
  • Add docs pages:
    • Introduction
    • Installation
    • Contributors
    • Contributing
      • Describe folder structure
      • Add section on contributing to the docs and website
    • Sponsoring

CI

  • Deploy docs website to GitHub Pages

Build

  • Update Node.js to version 16.16.0 to support Docusaurus
  • Configure a Yarn workspace to isolate Docusaurus dependencies in the docs-app project
  • Mark CONTRIBUTING.md as implicit dependency for the docs-app project to make this Markdown document part of affected detection despite it being located outside of the project root
  • Add the @nx-plus/docusaurus Nx plugin
  • Add @ngtools/webpack as an explicit dev dependency to fix the build of the analog-app project

To do

Before merge

  • Filter branches to main for push events in the CI workflow
  • Enable condition for Upload docs website step in the checks job in the CI workflow
  • Enable condition for deploy-docs job in the CI workflow
  • Configure Docusaurus for upstream organization and repository (analogjs/analog)
  • Configure Docusaurus for custom domain (https://analogjs.org)
  • Select GitHub Actions as Source in Settings -> Pages -> Build and deployment
  • Configure GitHub Pages for custom domain (https://analogjs.org)
  • Configure custom domain DNS records for GitHub Pages

@LayZeeDK LayZeeDK force-pushed the LayZeeDK/docs/create-docs-website branch 4 times, most recently from 25e194e to 366e072 Compare August 11, 2022 12:08
@LayZeeDK
Copy link
Contributor Author

LayZeeDK commented Aug 11, 2022

@brandonroberts
I'm seeing build errors for the analog-app project in this branch:

failed to load config from /home/runner/work/analogjs-analog/analogjs-analog/apps/analog-app/vite.config.ts
error during build:
Error: Cannot find module '@ngtools/webpack/src/ivy/transformation'
Require stack:
- /home/runner/work/analogjs-analog/analogjs-analog/node_modules/@analogjs/vite-plugin-angular/src/lib/angular-vite-plugin.js
- /home/runner/work/analogjs-analog/analogjs-analog/node_modules/@analogjs/vite-plugin-angular/src/index.js
- /home/runner/work/analogjs-analog/analogjs-analog/apps/analog-app/vite.config.ts
- /home/runner/work/analogjs-analog/analogjs-analog/node_modules/vite/dist/node/chunks/dep-71eb12cb.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at angular (/home/runner/work/analogjs-analog/analogjs-analog/node_modules/@analogjs/vite-plugin-angular/src/lib/angular-vite-plugin.js:22:54)
    at /home/runner/work/analogjs-analog/analogjs-analog/apps/analog-app/vite.config.ts:50:54
    at loadConfigFromFile (file:///home/runner/work/analogjs-analog/analogjs-analog/node_modules/vite/dist/node/chunks/dep-71eb12cb.js:62783:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async resolveConfig (file:///home/runner/work/analogjs-analog/analogjs-analog/node_modules/vite/dist/node/chunks/dep-71eb12cb.js:62[39](https://github.com/LayZeeDK/analogjs-analog/runs/7786750995?check_suite_focus=true#step:5:40)8:28)
    at async doBuild (file:///home/runner/work/analogjs-analog/analogjs-analog/node_modules/vite/dist/node/chunks/dep-71eb12cb.js:[43](https://github.com/LayZeeDK/analogjs-analog/runs/7786750995?check_suite_focus=true#step:5:44)3[58](https://github.com/LayZeeDK/analogjs-analog/runs/7786750995?check_suite_focus=true#step:5:59):20)

 >  NX   ERROR: Something went wrong in run-commands - Command failed: vite build

   Pass --verbose to see the stacktrace.

I have tried various combinations of regenerating the lockfile without any luck.

Reverting to Node.js 14.x doesn't do the trick either.

Have you seen anything like this or do you have an idea as to what could be the issue?

@LayZeeDK
Copy link
Contributor Author

LayZeeDK commented Aug 11, 2022

Explicitly adding @ngtools/webpack as a dev dependency seems to do the trick 💡🤞

@LayZeeDK LayZeeDK force-pushed the LayZeeDK/docs/create-docs-website branch 2 times, most recently from b37e3e3 to 16f41b3 Compare August 13, 2022 23:22
@LayZeeDK LayZeeDK marked this pull request as ready for review August 14, 2022 00:08
@LayZeeDK LayZeeDK force-pushed the LayZeeDK/docs/create-docs-website branch 2 times, most recently from d479d17 to 87873b8 Compare August 14, 2022 00:38
@LayZeeDK
Copy link
Contributor Author

Ready for review, @brandonroberts.

@brandonroberts
Copy link
Member

Awesome work Lars, this is looking great! I'm wondering if the planned features that aren't available yet should be removed from the homepage, such as the file-based routing and SSR/SSG. Or denoted as upcoming.

@LayZeeDK LayZeeDK force-pushed the LayZeeDK/docs/create-docs-website branch from 87873b8 to 5d44b1f Compare August 14, 2022 19:18
@LayZeeDK
Copy link
Contributor Author

All right, @brandonroberts. I marked the upcoming features on the home page. You won't be able to see it in the preview environment but here's a screenshot. Other than that, I rebased on top of the latest commit in the main branch of this repository.
localhost_3000_ (1)

Feel free to re-approve and merge after taking care of the remaining to-dos which I leave up to you 🙂

…` project

This is necessary for Nx to detect it affecting the project as the Markdown document is outside of the project root.
@brandonroberts brandonroberts merged commit 1bee60f into analogjs:main Aug 15, 2022
@brandonroberts
Copy link
Member

Thanks @LayZeeDK!

@LayZeeDK LayZeeDK deleted the LayZeeDK/docs/create-docs-website branch August 15, 2022 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DOCS]: Spin up docs site
2 participants