Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
jamsocket

GitHub Action

Deploy to Jamsocket

v0.1.2

Deploy to Jamsocket

jamsocket

Deploy to Jamsocket

This action will handle deploying session backend code to your Jamsocket service

Installation

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

              

- name: Deploy to Jamsocket

uses: jamsocket/[email protected]

Learn more about this action in jamsocket/jamsocket-deploy-action

Choose a version

Jamsocket Deploy Action 🚀

Automatically deploy session backend code to your Jamsocket service.

Configuration

To use this Jamsocket deploy action, add the action to your Github Workflow.

Here's an example of an action that will run whenever code is pushed to main.

To use this example, paste the code snippet below in a file called deploy.yml. Add that file to the .github/workflows directory in the root of your repository. When you push your code to main, you can view the running action in the Actions tab of your Github repository.

name: Deploy to Jamsocket
on:
  push:
    branches: [ "main" ]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Deploy to Jamsocket
        uses: jamsocket/[email protected]
        with:
          jamsocket_api_token: ${{ secrets.JAMSOCKET_API_TOKEN }}
          jamsocket_account: my-jamsocket-account
          jamsocket_service: my-jamsocket-service
          docker_build_context: ./server
          dockerfile_path: ./server/Dockerfile

Required Setup

The following options must be configured in order to make a deployment. As shown in the example above, the following options are added under the with section of your Deploy to Jamsocket step.

Key Value Information Type Required
jamsocket_api_token Your API token for Jamsocket authentication, which you can generate in Settings under Access Tokens. Store this API token as a secret in your repository's Settings page under Security > Secrets and variables > Actions > Repository secrets. with Yes
jamsocket_account The name of your Jamsocket account, which can be found in Settings under Account > name. with Yes
jamsocket_service The name of the Jamsocket service you are pushing your code to. with Yes
docker_build_context The path to the directory that your Docker build should access. This is often the directory the Dockerfile is in. with Yes
dockerfile_path The path to your Dockerfile. with Yes
docker_tag A custom tag for your Docker image. with No

Deployment

When a Jamsocket deployment is successful, you will find that a new image has been pushed to your Jamsocket service. You can find new images in the Jamsocket dashboard on the service page under Docker Images.