The web workflow is designed to build and publish Docker images to a registry and deploy them to a Kubernetes cluster.
- Copy the files from the
examples/web
folder and put them in the repository's.github/workflows
folder. - For the PR preview workflows, copy the template yaml files from the
examples/web/errata
folder and put them in the repositories.github/workflows
folder. - For the PR preview workflows, you will need to base64 encode the kubeconfig file (typically in
~/.kube/config
) and create an environment secret calledKUBECONFIG_FILE
with the contents. - To release a new website version, use the
create-release
workflow. It should automatically create a GitHub release and a Docker image with the current timestamp as the tag. - If the GitOps system is working properly, you should see a new PR created in the Devops repository. Merge the PR to deploy the new version to the cluster.
- Profit!
- create-release (docs) - Creates a GitHub release and publishes a Docker image with the current timestamp as the tag
- docker-build (docs) - builds a Docker image and pushes it to a registry
- pr-preview-cleanup (docs) - Removes a PR preview deployment from the cluster when the PR is closed
- pr-preview-deploy (docs) - Deploys a PR preview to the cluster when given the
preview
label - web-cd (docs) - Manages publishing a web application release
- web-ci (docs) - Manages building of a web application during the development lifecycle
The mobile workflow is designed to publish code during all phases of development to make testing easier without having to dive into the developer workflow. It utilizes public actions created by Expo and Nearform.
- Copy the files from the
examples/mobile
folder and put them in the repository's.github/workflows
folder. - Install the optic-release-automation GitHub app to your organization (or selected repositories)
- In the
package.json
, ensure there is aversion
string property that follows semantic versioning, and aversionCode
number property. - In the
release.yml
workflow, make sure there is a build-command input in theoptic-release-automation-action
action that will increment the version code when run (we ended up using a node script that can be found in the examples folder). - Add a repository secret
EXPO_TOKEN
that contains a token generated in EAS that has permission to the project. - Profit
- expo-eas-build (docs) - queues a build in Expo EAS
- expo-eas-clean (docs) - cleans up old branches/channels in EAS
- expo-eas-submit (docs) - submits builds to the app stores
- expo-eas-update (docs) - publishes changes to a channel via Expo EAS
- mobile-cd (docs) - manages publishing a mobile application release
- mobile-ci (docs) - manages publishing of a mobile application during the development lifecycle