Continuous Integration/Continuous Deployment (CI/CD)

opeNode can be easily integrated with your favourite continuous integration tool.

You can use the following commands in order to generate the opeNode config file and then automatically deploy your website:

npm install -g openode

openode ci-conf ${OPENODE_TOKEN} YOUR_SITENAME

openode deploy

npm install -g openode will install the openode command line interface. The website is deployed with the openode deploy command using the token and site name defined in the options. $OPENODE_TOKEN must be defined in your environment variables.

For example with Travis CI, you can define a .travis.yml as follows:

language: node_js
node_js:
  - '10'

install:
  - npm install -g openode

deploy:
  provider: script
  script: bash scripts/deploy-ci.sh
  on:
    branch: master

where scripts/deploy-ci.sh is the build script:

#!/bin/sh

openode ci-conf ${OPENODE_TOKEN} YOUR_SITENAME

openode deploy # You can alternatively use "openode sync-n-reload" when your instance is already up

Notice the file .openode will be written in a temporarily space provided by the deployment service.