GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Paperspace/deploy-action: GitHub action for syncing Paperspace container deployments.

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
BranchesTags
Open more actions menu

Latest commit

 

History

94 Commits
94 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
dist
dist
 
 
src
src
 
 
.eslintrc.js
.eslintrc.js
 
 
.gitignore
.gitignore
 
 
.tool-versions
.tool-versions
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
action.yaml
action.yaml
 
 
package.json
package.json
 
 
pnpm-lock.yaml
pnpm-lock.yaml
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

Paperspace Deployment Action

A GitHub action for deploying updates to a Paperspace deployment.

Inputs

Input Type Required? Description
projectId string Yes The ID of the project the deployment lives under
apiKey string No Your Paperspace API key. This may also be set using the PAPERSPACE_API_KEY environment variable.
configPath string No The relative file path of the configuration file.
image string No Container image to be used in the configuration

Usage

uses: paperspace/[email protected]
env:
  PAPERSPACE_API_KEY: ${{ secrets.PAPERSPACE_API_KEY }}
with:
  projectId: p28rlnvnw51

You can also pass the api key as an input.

uses: paperspace/[email protected]
with:
  apiKey: ${{ secrets.PAPERSPACE_API_KEY }}
  projectId: p28rlnvnw51

Providing an image as an input

Mark the image as replacable using :image within your .paperspace/app.yaml.

enabled: true
name: Demo
image: :image
port: 8888
resources:
  replicas: 1
  instanceType: P4000
uses: paperspace/[email protected]
env:
  PAPERSPACE_API_KEY: ${{ secrets.PAPERSPACE_API_KEY }}
with:
  image: paperspace/deployment-fixture:${{ steps.docker-tag-name.outputs.DOCKER_TAG_NAME }})
  projectId: p28rlnvnw51

Example of a complete workflow

name: test-pr
on:
  pull_request:
    paths:
      - "*"

jobs:
  release:
    name: Release
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - uses: paperspace/[email protected]
        name: Deploy Staging
        id: deploy
        env:
          PAPERSPACE_API_KEY: ${{ secrets.PAPERSPACE_API_KEY }}
        with:
          projectId: p28rlnvnw51
          image: nginx:latest

Example of a complete build and deploy

An example of building a custom image and syncing the deployment to Paperspace after pushing to a container registry.

name: fixture-release
on:
  push:
    tags:
      - deployment-fixture@*

jobs:
  release:
    name: Release
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - name: Set docker tag name
        run: echo "::set-output name=DOCKER_TAG_NAME::$(echo $GITHUB_REF | cut -d / -f 3 | sed 's/deployment-fixture@//')"
        id: docker-tag-name

      - name: Set up docker build
        uses: docker/setup-buildx-action@v1

      - name: Login to DockerHub
        uses: docker/login-action@v1
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}

      - name: Build and push
        uses: docker/build-push-action@v2
        with:
          file: Dockerfile
          push: true
          tags: |
            paperspace/deployment-fixture:${{ steps.docker-tag-name.outputs.DOCKER_TAG_NAME }}

      - uses: paperspace/[email protected]
        name: Deploy to Paperspace
        id: deploy
        env:
          PAPERSPACE_API_KEY: ${{ secrets.PAPERSPACE_API_KEY }}
        with:
          projectId: ptzm6ujwqwa
          image: paperspace/deployment-fixture:${{ steps.docker-tag-name.outputs.DOCKER_TAG_NAME }}

Configuration paths

You may supply an optional relative path to a Paperspace config as follows:

- uses: paperspace/[email protected]
  name: Deploy action
  id: deploy
  env:
    PAPERSPACE_API_KEY: ${{ secrets.PAPERSPACE_API_KEY }}
  with:
    projectId: p28rlnvnw51
    configPath: ./random/paperspace.jsonc
    image: paperspace/deployment-fixture

By default, the action looks for a config file in order of precedence:

  • paperspace.yaml
  • paperspace.yml
  • paperspace.json
  • paperspace.jsonc
  • paperspace.toml
  • .paperspace/app.yaml
  • .paperspace/app.yml
  • .paperspace/app.json
  • .paperspace/app.jsonc
  • .paperspace/app.toml

File extensions

.json, .jsonc, .toml, .yaml, .yml are all supported.

Default apiVersion

Deployments allow for versioned deployment specs. Example:

enabled: true,
name: Demo
apiVersion: v0alpha1
...

These versions are not required. If a version is not supplied in the deployment config file used by this GitHub Action, latest will be used implicitly.

About

GitHub action for syncing Paperspace container deployments.

Resources

Readme
Apache-2.0 license
Activity
Custom properties

Stars

8 stars

Watchers

2 watching

Forks

7 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.