Skip to content

Commit

Permalink
docs: Document how to use Flox in CircleCI (#18)
Browse files Browse the repository at this point in the history
Co-authored-by: Bryan Honof <[email protected]>
  • Loading branch information
garbas and bryanhonof authored Sep 12, 2024
1 parent 4225f22 commit 50b4ded
Showing 1 changed file with 30 additions and 7 deletions.
37 changes: 30 additions & 7 deletions docs/tutorials/ci-cd.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ use Flox with some of the CI/CD platforms.

## Github Actions

An example GitHub workflow.
There are two actions that you can use in a Github workflow:
- `flox/install-flox-action` (r
- `flox/activate-action` (runs command in the context of Flox environment)

An example GitHub workflow:

```yaml title=".github/workflows/ci.yml"
name: "CI"
Expand All @@ -30,10 +34,10 @@ jobs:
uses: "actions/checkout@v4"

- name: "Install Flox" # (2)!
uses: "flox/install-flox-action@main"
uses: "flox/install-flox-action@2"

- name: "Build" # (3)!
uses: "flox/activate-action@main"
uses: "flox/activate-action@1"
with:
command: npm run build

Expand All @@ -49,13 +53,32 @@ jobs:
environment.


## CircleCI

There is a [Flox Orb](https://github.com/flox/flox-orb) that can help you use
Flox inside CircleCI.

## GitLab CI/CD
An example CircleCI workflox:

TODO

## CircleCI
```yaml title=".circleci/config.yml"
version: 2.1

orbs:
flox: flox/[email protected]

workflows:
build-website:
jobs:
- flox/install # (1)!
- flox/activate: # (2)!
command: "npm run build"
```
1. The `install` command will install the latest Flox version. You can change
the `channel` and `version` option which allows you to select excatly which
version of Flox to install.
2. The `activate` command runs a command in the context of a Flox environment.

TODO


0 comments on commit 50b4ded

Please sign in to comment.