Skip to content
play

GitHub Action

Publish and Deploy App

v1 Latest version

Publish and Deploy App

play

Publish and Deploy App

An action than publishes and deploys a VTEX IO app after release

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Publish and Deploy App

uses: tiago-freire/vtex-publish-deploy-action@v1

Learn more about this action in tiago-freire/vtex-publish-deploy-action

Choose a version

vtex-publish-deploy-action

An action than publishes and deploys a VTEX IO app after release

Requirements

First, you need to create an application key with publish, install and deploy app permissions for your account.

Then, create the following secrets in your Github repository secrets with respectively values of created application key and token:

  • VTEX_TOOLBELT_KEY
  • VTEX_TOOLBELT_TOKEN

How to use

Simply create a yml file under .github/workflows directory of your project with the suggested content:

name: Publish and Deploy App

on:
  push:
    tags:
      - "v[0-9]+.[0-9]+.[0-9]+"
  workflow_dispatch:

jobs:
  publish_and_deploy:
    name: Publish and Deploy App
    runs-on: ubuntu-latest
    steps:
      - uses: tiago-freire/vtex-publish-deploy-action@v1
        with:
          appKey: ${{ secrets.VTEX_TOOLBELT_KEY }}
          appToken: ${{ secrets.VTEX_TOOLBELT_TOKEN }}

Then, after each vtex release patch|minor|major stable command, where a tag with v[0-9]+.[0-9]+.[0-9]+ pattern is created in the repository, the action will be executed.