Publish from GitHub
Once more than one person changes the motions, keep the tenant repository on GitHub and let merges to main publish. Two pieces make that work: a workflow in the repository that checks every pull request and pushes main live, and the GitHub connection in the app, which turns edits made in the app into pull requests.
The workflow
Section titled “The workflow”Add this file as .github/workflows/motions.yml. Pull requests run check, the TypeScript check and your tests. A merge to main runs them again and then pushes live.
name: Motions
on: pull_request: push: branches: [main]
jobs: check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 22 - run: npm ci - run: npx motions check - run: npm run typecheck - run: npx motions test
push: needs: check if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest concurrency: motions-push steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 22 - run: npm ci - run: npx motions push --live env: MOTIONS_URL: ${{ vars.MOTIONS_URL }} MOTIONS_TOKEN: ${{ secrets.MOTIONS_TOKEN }}Then, in the repository’s settings on GitHub, under Secrets and variables → Actions:
- Add a variable
MOTIONS_URL, the address you open the app at. - Create an API token in Motions (Settings → API tokens) with your own handle and the approver role. Add it as a secret named
MOTIONS_TOKEN.
Each push records the commit it came from, so a version’s page shows the commit and whether main still has it.
Connect the repository
Section titled “Connect the repository”Connecting lets people edit a motion in the app, safely: the edit becomes a pull request, and the workflow above publishes it when it’s merged.
- Open Settings → GitHub and choose to connect. Only owners and admins can.
- GitHub asks you to install the Motions GitHub App on your account or organization, and to authorize it. In an organization, an owner may have to approve the install first.
- Back in Motions, pick the repository, and the tenant folder: empty when the repository is the tenant, or a path such as
clients/v360when it holds more than one. - Choose Connect. The page now shows the repository, the folder and the default branch.
If the page says “GitHub isn’t set up on this engine”, the platform hasn’t been configured for GitHub yet; ask Pruma.
Edits made in the app
Section titled “Edits made in the app”An approver can change a motion’s steps and rules from a version’s Code tab without a terminal:
- Edit, then Save draft. This makes a new draft version, marked “not in git”.
- Open PR. The version’s page puts the changed files on a branch and opens a pull request on the connected repository.
- Merge it. The workflow pushes
mainlive. The push contains the edit, so the draft becomes the live version, now marked “in git”.
motion.yaml can’t be edited in the app, only in the repository. A step can only be edited in the app if it imports nothing but its own motion’s files and the SDK.
Without a connected repository, you can still bring an app edit into your folder by hand:
npx motions pull <version> --motion weeklypull writes the version’s files into motions/weekly/, and refuses to overwrite files with uncommitted changes unless you pass --force.
Motions is built by Pruma. These docs describe what the platform does today; Limitations lists what it doesn't do yet. Open the app