Send a read to Mortise Cloud
mortise push reads an app the way mortise check does and sends what it read to Mortise Cloud, the
paid service beside Mortise. The cloud keeps the read of each commit and compares a pull request with
its base. Mortise itself judges one commit; push only sends.
-
Look at what would be sent. From the app folder:
Terminal window mortise push --dry-runThe document holds names, paths relative to the app, counts, and the class names that cross module boundaries. It holds no source code and nothing from
.env. A dry run sends nothing and needs no token. To get the tool, see Install the command line tool. -
Make a token for the app in Mortise Cloud, and keep it as a secret of the repository named
MORTISE_TOKEN. The tool reads the token from that variable only and never prints it. -
Add the push before the check in your workflow, so that a pull request with a problem still reaches the cloud:
jobs:boundaries:runs-on: ubuntu-lateststeps:- uses: actions/checkout@v5- uses: mortise-dev/setup-mortise@v1- run: mortise pushenv:MORTISE_TOKEN: ${{ secrets.MORTISE_TOKEN }}- run: mortise check --format githubOn GitHub Actions the tool takes the pull request and the run from the environment, and the commit that is checked out. It prints the URL of the snapshot in the cloud.
Record a deploy
Section titled “Record a deploy”In the job that deploys, add the environment:
mortise push --environment productionThe cloud records a deploy of the commit to that environment.
When the cloud is down
Section titled “When the cloud is down”An outage never fails the build. The tool tries again three times, then warns and exits 0. A plan limit also warns and exits 0. A wrong token, or a document the cloud refuses, exits 4: only you can fix it. The exit codes are in Command line tool.
Outside GitHub Actions
Section titled “Outside GitHub Actions”Give what the environment would give:
mortise push --branch feature/split --pull-request 42 --base-branch main --base-commit <sha>The commit and the branch default to those of HEAD. MORTISE_CLOUD_URL names another host, such as a
staging one.