Git Product home page Git Product logo

meli-deploy-github-action's Introduction

Meli deploy Github Action

This action makes it easier to work with Meli (static website hosting) within GitHub Actions. You can quickly build and deploy new releases or delete branches with their releases.

As Meli is still in beta, this action is only pre-release, and functionality may change in the future. Tested with Meli v1.0.0-beta.22. Any enhancements or feature requests are welcome!


Examples

Deploy release on push: deploy-branch-preview.yml

Deploy release on PR: deploy-pr-preview.yml

Remove branch on branch delete / PR closed: remove-branch.yml


Inputs

action

Required
Action to make. Currently, it can be either release or remove.

meliUrl

Required
Base URL of your Meli server (without trailing slash, ie. https://meli.dvdev.cz

meliSiteId

Required
Site ID of your Meli site

meliSiteToken

Required (for release action)
Site token of your Meli site

In the future, there will be the option to use API tokens for release action. See Meli's issue #216 for more info.

meliApiToken

Required (for remove action)
Meli API token with release_delete, site_branch_delete site.site_releases_list andsite.site_branch_list scope enabled.

meliSiteRelease

Name of release.
Defaults to: YYYY-MM-DD HH:MM:SS | <branchName> | <commit-SHA>

branchName

Name of Meli branch.
Defaults to: <branch> or pr-<number-of-pr>

  • In case of branch push, branchName will default to Git branch name as follows:
    • in case of branch main, branchName will be main
    • in case of branch feature/update (or any other prefixes like release/*), branchName will be update (it takes only the part after the last slash)
  • In case of a pull request, branchName will default to pr-${pr_number} (for example, pr-6 for PR #6)

buildFolder

Folder with files to release. The path is taken from the root of your repository.
Defaults to dist.


Outputs

meliDeployUrl

URL of deployed release.

It wiill be filled only within release action.


Example usage

- name: Deploy static site preview
  uses: digitalvisioncz/[email protected]
  id: meli
  with:
    action: release
    meliUrl: https://meli.dvdev.cz
    meliSiteId: ${{ secrets.MELI_SITE_ID }}
    meliSiteToken: ${{ secrets.MELI_SITE_TOKEN }}
    buildFolder: out

More examples with comments are in the examples folder.

meli-deploy-github-action's People

Contributors

littlewall avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.