Skip to content
anchor

GitHub Action

bevry-actions/surge

v1.1.0 Latest version

bevry-actions/surge

anchor

bevry-actions/surge

GitHub Action to publish your project to https://surge.sh

Installation

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

              

- name: bevry-actions/surge

uses: bevry-actions/surge@v1.1.0

Learn more about this action in bevry-actions/surge

Choose a version

bevry-actions/surge

Once your tests succeed, use this action to deploy your commit, branch, and tag to Surge.

This allows you to git ignore your outputs (e.g. build files, documentation, etc) such that their changes don't make your repository dirty, nor pollute your git history, while allowing you to leverage CDN to reference your source code and outputs, for every commit, branch, and tag.

Example

For instance, for the ambi project.

You can get the rendered documentation for:

the master branch via

http://master.ambi.bevry.surge.sh/docs/globals.html

the v8.22.0 tag via:

http://v8.22.0.ambi.bevry.surge.sh/docs/globals.html

the 0250e1ed2cbc01773e0974165d1c9469c922b271 commit via:

http://0250e1ed2cbc01773e0974165d1c9469c922b271.ambi.bevry.surge.sh/docs/globals.html

Install

Make sure that the desired surge version you wish to use is installed locally:

npm install --save-dev surge

And add the following to your GitHub Action workflow after your tests have completed and you have built your compile targets/documentation.

- name: publish to surge
  uses: bevry-actions/surge@main
  with:
      surgeLogin: ${{secrets.SURGE_LOGIN}}
      surgeToken: ${{secrets.SURGE_TOKEN}}

License

Public Domain via The Unlicense