- Published on
GitHub Actions
- Authors
- Name
- Kevin Olson
- @fumeapp
Fume now has an official GitHub action with detailed instructions on how to set it up. Head on over to the marketplace to see detailed instructions.
TL;DR:
- Set a GitHub Secret as
FUME_TOKEN
with a created token from the tokens section - Add and check-in a Workflow File in your repo - ex:
.github/workflows/deploy-fume.yml
using syntax similar to
name: Deploy with fume
on:
push:
branches: [staging, production]
jobs:
fume:
name: Deploy with Fume
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: fumeapp/action@master
with:
token: ${{ secrets.FUME_TOKEN }}
# this passes the name of the branch
environment: ${GITHUB_REF##*/}
This workflow will deploy to the
staging
andproduction
environments if commits and/or merges happen in branches of the same name
This can also be achieved with GitLab CI/CD:
- Do the same as step 1 above but set it in Settings -> Ci/CD, Variables -> Expand and
Add Variable
- Add a workflow file as
.gitlab-ci.yml
in your repository
stages:
- deploy
deploy:
image: node:latest
stage: deploy
script:
- apt-get update -y
- apt-get install zip -y
- export FUME_TOKEN=$FUME_TOKEN
- npm i -g fume-cli
- fume deploy staging
only:
- staging
This workflow will deploy to the
staging
andproduction
environments if commits and/or merges happen in branches of the same name