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

GitHub Action

Deploy to Gist

v1.0.5

Deploy to Gist

upload-cloud

Deploy to Gist

📌 Deploy file to Github Gist

Installation

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

              

- name: Deploy to Gist

uses: exuanbo/actions-deploy-gist@v1.0.5

Learn more about this action in exuanbo/actions-deploy-gist

Choose a version

Deploy to Gist

GitHub release (latest by date) GitHub Workflow Status (branch) libera manifesto

This is a Github Action to deploy your file to Github Gist.

Quick start

- uses: actions/checkout@v2
- name: Deploy
  uses: exuanbo/actions-deploy-gist@v1
  with:
    token: ${{ secrets.TOKEN }}
    gist_id: from_your_gist_url
    gist_file_name: foo.bar
    file_path: ./dist/foo.bar

Setup

Prep work

  1. Create a gist (public or secret) if you don't have one.
  2. Generate a new Personal access token. Only the gist scope is needed. Check Scopes for OAuth Apps for details.

Project setup

  1. Go to the repo Settings > Secrets. Add the generated token with name TOKEN.
  2. Edit workflow file .github/workflows/deploy.yml as the example above.

Options

token

The personal access token for updating gist.

gist_id

The id portion from your gist url, e.g. https://gist.github.com/exuanbo/e885afa349a0e5d1cfb408e46d6a37bc.

gist_file_name (optional)

The name of the file to be added in your gist. If not provided, the original file name from file_path will be used.

file_path

Relative to your repo's root directory, e.g. ./dist/foo.bar.

License

MIT License © 2021 Exuanbo