Context
This article covers Static-pages version 1.0.9, a previous version of the service that is still available and can be used on the EDITO platform. The version number identifies the specific release documented here, as configuration options and features may differ between versions.
In this guide, you'll learn how to configure, deploy, and update your static website using Static-pages v1.0.9:
Deploy a static website
You can easily deploy a static website on your space, accessible at an address such as: https://my-custom-name.lab.dive.edito.eu
The Static-pages service allows you to host and automatically serve the files of a static website from a public or private Git repository. This service is ideal for hosting a documentation, a data visualization or any other static web content directly from your source code.
Push the required files (index.html, assets/, etc.) to a remote repository. Then, start a Static-pages service from your space on the Datalab. You will be prompted to fill in a configuration form.
💡 EDITO Pro Tip : you can save your configuration by giving it a name (1) and clicking on save (7)! Do not forget to save just before launching (8) to have the full configuration saved.
Resources (2)
Here you can define the resources on which the service will run. Your service will have at least the requested resources (1) and never more than its limits (2).
Git (3)
You now need to provide Git repository access information in the Git section (3). There are two possibilities:
If your repository is public:
Enable Add git config inside your environment in the Git section
(3)of the form to enable internal Git configurationProvide the repository URL in Repository
If your repository is private, you can add your authentication information in the corresponding fields:
Name
Email
Token (personal access token)
By default, the service will pull files from the main branch of your repository. If you need to target a specific branch, specify its name in the Branch field.
Static website files (4)
The service automatically reads the content of your index.html file:
If your
index.htmlfile is located in a subdirectory of the repository, specify the path in SourceIf the files are located at the root of the repository, you can leave this field empty
Ingress Details (5)
You can customize the service URL, for example: https://my-custom-name.lab.dive.edito.eu
Building your static website (6)
In case your source files need to be built, you need to specify the path to the build script. This script shall install the tools needed to build the source files. Be aware that the script will run at every refresh of the Git files, hence it shall avoid re-installing dependencies every time.
This is an example of such a build script for a yarn-based website:
#!/usr/bin/bash
SCRIPT_DIR=$( dirname $(readlink -f "${BASH_SOURCE[0]}") )
pushd $SCRIPT_DIR > /dev/null
which node
returnValue=$?
if [ $returnValue -ne 0 ]; then
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | bash
\. "$HOME/.nvm/nvm.sh"
nvm install 22
echo "Node version: `node -v`"
echo "Node current version: `nvm current`"
echo "NPM version: `npm -v`"
echo "Install Yarn..."
npm install --global yarn
echo "Yarn installed"
fi
yarn --cwd /app/repository install
yarn --cwd /app/repository build
popd > /dev/null
The /app/repository is the home of your cloned repository in the running container. You can use the website source path variable specify at the service launch time if wanted, as follows app/repository/$WEBSITE_SOURCE_PATH.
Updating your website
The service automatically checks the repository for updates every 5 minutes. To trigger an immediate refresh, call the public update endpoint /update:
This will instantly fetch the latest changes from your Git repository.
Once everything is ready, don't forget to save your configuration by changing the friendly name (1) and clicking save (7).
📌 Note: the friendly name must be less than 48 characters long and can only contain “-” (dash); it cannot contain “_” (underscore) or spaces.
You can then launch (8) the tool, and your process will be visible in the Service Playground catalogue within 5 minutes.
What's next?
For the latest features and configuration options, see the latest Static-pages documentation.
If you have any questions, problems, or suggestions, please feel free to contact us via chat using the widget available at the bottom right of the page.




