Skip to main content
Version: Next

CI/CD

refter makes it easy to automatically deploy any updates to your documentation to refter using your favorite CI/CD tool.

GitHub Actions

The setup-refter github action makes it easy to install the refter-cli and deploy your documentation to refter.

Usage

Initialize refter-cli in your workflow:

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- uses: refter-io/setup-refter@v1.0.1
- run: refter --help

Install a specific version, using SemVer's version syntax

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- uses: refter-io/setup-refter@v1.0.1
with:
version: "0.1.3"
- run: refter --help

Full example

info

The example assumes you have REFTER_TOKEN and DBT_BIGQUERY_TOKEN configured as secrets in your GitHub repository.

name: Deploy to refter

on:
push:
branches:
- main

jobs:
action:
runs-on: ubuntu-latest

steps:
- name: Checkout the code
uses: actions/checkout@v3

- name: Setup python
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install dbt dependencies
uses: mwhitaker/dbt-action@master
with:
dbt_command: "dbt deps"
env:
DBT_BIGQUERY_TOKEN: ${{ secrets.DBT_BIGQUERY_TOKEN }}

- name: Create dbt manifest
uses: mwhitaker/dbt-action@master
with:
dbt_command: "dbt ls --profiles-dir ."
env:
DBT_BIGQUERY_TOKEN: ${{ secrets.DBT_BIGQUERY_TOKEN }}

- name: Setup refter-cli
uses: refter-io/setup-refter@v1.0.1

- name: Deploy to refter
run: refter deploy -t ${{ secrets.REFTER_TOKEN }}
env:
CI_COMMIT: ${{ github.sha }}
CI_BRANCH: ${{ github.ref_name }}

GitLab CI/CD

Coming soon...