This is the sequence of steps to follow to create a root gh-pages branch. It is based on a question at [SO]
cd /path/to/repo-name
git symbolic-ref HEAD refs/heads/gh-pages
rm .git/index
git clean -fdx
echo "My GitHub Page" > index.html
| image: docker:latest | |
| services: | |
| - docker:dind | |
| stages: | |
| - build | |
| variables: | |
| IMAGE: registry.gitlab.com/bamnet/njtdata | |
| DOCKER_CLI_EXPERIMENTAL: enabled |
| #!/usr/bin/env bash | |
| set -eo pipefail | |
| set -u | |
| ## INSTALL OPERATOR (is install in default namespace, to use another namespace need to modify the yaml) | |
| n=0 | |
| until [ $n -ge 3 ]; do | |
| kubectl apply -f https://storage.googleapis.com/knative-nightly/operator/latest/operator.yaml > /dev/null && break | |
| echo "Kourier failed to install on first try" |
| #!/bin/bash | |
| set -e | |
| set -o pipefail | |
| # kubectl convert is a plugin or binary that can be used | |
| # can be fetched from https://www.downloadkubernetes.com/ | |
| # | |
| KUBECTL_CONVERT_BIN=$HOME/Downloads/kubectl-convert | |
| mkdir -p {pre,converted} |
| apiVersion: example.com/v1 | |
| kind: DigesterFunction | |
| metadata: | |
| name: digester | |
| annotations: | |
| config.kubernetes.io/function: | | |
| exec: | |
| path: ./digester |
| objects = [MyObject.new(name: "John Smith"), MyObject.new(name: "Joan Smith"), MyObject.new(name: "Jane Doe")] | |
| objects.select {|o| o.name["Smith"]}.each do |o| | |
| o.name.gsub!("Smith", "Jones") | |
| o.save | |
| end |