ApsimX Variable is an application which can be used to create a NextGen Variable in JSON file format. The user can create a JSON file by parsing their own variables or using a template which provide the basic variable to effectively create a NextGen Variable file. Besides that they can also view their variable in their file.
npm i
npm run dev
Push code to master branch
To deploy ApsimX Variable to Github pages, there are some required configurations
-
package.json
homepage- to set up the url on remote Github Pages
-
next.config.mjs
- distDir - to tell NextJS where it should create the production file to.
- assetPrefix - to tell NextJS to add this prefix to every assets path. Github Pages requires this setting to map the asset to the application
-
babel-config.js
- BACKEND_URL - to change the domain of routing inside the components. Default value:
/Apsim.Variables\
- BACKEND_URL - to change the domain of routing inside the components. Default value:
-
babelrc.js to transform the env in
babel-config.jsfile to remote env without creating the.envfile -
github-pages.yml github action which use to create static files to
gh-pagesbranch. Then Github will deploy application to Github pages fromgh-pages
- Step 3 and 4 can be ignore
BACKEND_URLif we set up the configuration on Github repository, however in NextJS, the env have to haveNEXT_as variable config.
- Github settings for Github Pages
- Basic Github Pages set up for React Application
- Github pages settings for NextJS Application
- Github action setting