Continuous Integration
The Wonderland Editor Docker Image allows setting up efficient continuous integration and delivery of Wonderland Engine projects.
This page describes how to set up efficient automated builds and deployment with the most popular CI services:
Gitlab CI / Gitlab Pages
Using any docker runner (e.g. the gitlab.com shared runners) on Gitlab.
Configuration
Your .gitlab-ci.yml
should look like follows:
|
|
$WLE_CREDENTIALS
is a variable containing email:password
. We will configure it in the next
step.
Variables
Find variables for Gitlab CI in the Gitlab web interface: Settings > CI/CD > Variables.
Click “Add Variable” and name it WLE_CREDENTIALS
and set its value to email:password
,
where email
is the email of your Wonderland Engine account and password the matching
password.
For public projects make sure to enable “Protect variable” to prevent unmerged merge requests from being able to access the CI variable.
Cache
The most time-consuming task in the editor is compressing textures. This is significantly faster, if the results are cached (in the cache/ directory). It is therefore useful to either specify this folder for the CI cache, or check in the files into source control.
GitHub Workflows / GitHub Pages
Using any docker-enabled runner (e.g. the GitHub hosted runners) on GitHub.
Configuration
Your workflow file (e.g. .github/workflows/github-pages.yml
) should look like follows:
|
|
Project.wlp
is your project file.
$WLE_CREDENTIALS
is a secret containing email:password
. We will configure it in the next
step.
The deploy-pages
job will only run on the default branch of your
repository (usually main
).
Secrets
Find secrets for GitHub Workflows in the GitHub web interface: Settings > Secrets > Actions.
Click “New repository secret” on the top right and name it WLE_CREDENTIALS
and set its value to email:password
,
where email
is the email of your Wonderland Engine account and password the matching password.
Secrets are not passed to pullrequests from forks, which means your workflow may not run for pullrequests from outside collaborators.
Bitbucket CI
Using any docker-enabled runner (e.g. the GitHub hosted runners) on GitHub.
Configuration
Your pipelines file (e.g. bitbucket-pipelines.yml
) should look like follows:
Project.wlp
is your project file.
$WLE_CREDENTIALS
is a secret containing email:password
. We will configure it in the next
step.
Note that Bitbucket currently does not offer a service for static page hosting like Gitlab Pages or GitHub Pages. Instead, you can combine this with deploy to netlify.
Deploy to Netlify
Here we are using Netlify CLI for the “continuous deployment”.
Configuration
Configure .gitlab-ci.yml
as described in Gitlab CI.
Add deploy to the stages:
Then append the following deploy job to the end of the file:
Variables
Find variables for Gitlab CI in the Gitlab web interface: Settings > CI/CD > Variables.
Add a variable with a key as NETLIFY_AUTH_TOKEN
and set its value to the netlify access
token. You can create it here.
Similarly, add another variable with a key as NETLIFY_SITE_ID
. Set its value to the
“Site ID” of the site that you want to deploy. This will be found on
site settings > General > Site details > Site information
.
(In case you haven’t created a site, follow the guide
here).