- Node.js 12.22.0 or later
- MacOS, Windows (including WSL), and Linux are supported
- Install dependencies run
npm install
- Run Unit Test run
npm test
- Run in local
npm run dev
- Run linter
npm run lint
- .next: NextJs build default folder
- helper: Helper and utils function used in all project
- in: Source data in format md, it have specific folder to Content provider (cp), Learning Object (lo) and Playlist (playlist), to execute a successful build you need copy md files at the source folder
- out: Save static page after build process with their sitemap and assets
- public: resources and assets
- src: source code
You can perform a build by operative system, available command are:
npm run dev-static:linux
npm run dev-static:windows
npm run build:linux
npm run build:windows
1- Run npm run build-static
2- Static pages were builded on folder /out/
npm run repair-index
SEO Resource hub page use gitlab ci https://code.go1.com.au/go1-seo/go1-moonshot-nextjs-plugin/-/pipelines The plugin has the following types of deploy more info
Making a merge request with your changes to the following branches you can deploy to develop, staging and production enviroments, when the merge request is approved and merged, the deploy start automatically
- develop: This deploy is performed in Moonshot AWS, use S3 Bucket (go1-seo-content). the url is https://d2og0a2uaw207o.cloudfront.net/resources-hub/index.html
- staging: This deploy is performed in GO1 Azure, use blob storage (go1moonshotuat). the url is https://website.qa.go1.cloud/resources/hub/
- master: This deploy is performed in GO1 Azure, use blob storage (go1moonshot). the url is https://www.go1.com/resources/hub/
1- Open the project on gitlab https://code.go1.com.au/go1-seo/seo-prismic 2- Enter on CI/CD menu option and press pipelines https://code.go1.com.au/go1-seo/seo-prismic/-/pipelines 3- Press run pipeline button https://code.go1.com.au/go1-seo/seo-prismic/-/pipelines/new 4- Select your branch following the gitworkflow to target a enviroment 5- Press Run Pipeline
We have best practice to code, those are describe on confluence https://go1web.atlassian.net/wiki/spaces/MSEO/pages/2193096748/Component+Development+Best+Practices