CI/CD Support
The Tapcart CLI supports deploying blocks via CI/CD. For example, you can create a GitHub repository and publish all your blocks on a merge to main.
Here's an example GitHub action workflow that you can use to publish:
name: Publish Tapcart Blocks
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install CLI
run: |
npm install -g @tapcart/tapcart-cli
- name: Push to Store
run: |
export TAPCART_API_KEY=${{ secrets.TAPCART_API_KEY }}
tapcart block push --all --live --yes--all/-a pushes every local block, and --live/-l publishes it immediately. Pushing live normally prompts for confirmation, but the CLI auto-confirms in any non-interactive shell (like CI) — --yes/-y is optional there, but recommended so the intent is explicit in the workflow file. You can also pass --message/-m to record what triggered the push (e.g. the commit SHA).
Please contact the Tapcart support team and they can issue you an API key for usage.
Warning!These Tapcart API keys should be considered secret - they are generated on a per app basis and gives control to update and publish your application's blocks. The Tapcart team can help with rotating API keys if necessary.
Updated about 1 month ago
