-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #232 from stateful/refactorintegration
first draft
- Loading branch information
Showing
6 changed files
with
144 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
sidebar_position: 2 | ||
title: Runme with Fresh App on Deno Cloud | ||
--- | ||
|
||
# Runme with Fresh App on Deno Cloud | ||
|
||
The first example is in the `fresh` folder and sets up a fresh service with deno. You can manually check out this example by [opening it with Runme](https://runme.dev/api/runme?repository=https%3A%2F%2Fgithub.com%2Fstateful%2Fvscode-runme.git&fileToOpen=examples%2Ffresh%2FREADME.md). | ||
|
||
### Local Environment | ||
|
||
Runme makes setting up your local environment a breeze! Here, you can see a few install scripts that will set everything up: | ||
|
||
![Runme Local Environment](../../static/img/runme-local-enviroment.png) | ||
|
||
In a future version of Runme, we plan on only showing installers relevant to your current operating system/environment. Stay tuned! | ||
|
||
### Environment Variables | ||
|
||
Runme can also be used to establish local environment variables for the current session. | ||
|
||
![establish environmental variables in vs code](../../static/img/environmental-variables-vs-code.png) | ||
|
||
Environment variable support in Runme is currently a work in progress. We have a lot planned for supporting the environment/secrets in the future, so stay tuned! | ||
|
||
### Deploying | ||
|
||
For a deploy script, such as the one below, running as a Background task is a great idea, since it is a long-running script. | ||
|
||
![deploy script in vs code](../../static/img/deploying-a-script.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
sidebar_position: 4 | ||
title: Runme with Next.js App on Vercel | ||
--- | ||
|
||
import Infobox from "../../src/components/Infobox.tsx" | ||
|
||
# Runme with Next.js App on Vercel | ||
|
||
This example can be found in the `vercel` sub-folder. You can manually check out this example by [opening it with Runme](https://runme.dev/api/runme?repository=https%3A%2F%2Fgithub.com%2Fstateful%2Fvscode-runme.git&fileToOpen=examples%2Fvercel%2FREADME.md). | ||
|
||
### Setup/Environment | ||
|
||
Similar to the last example, we can do our setup, starting, and opening of the web browser using Runme: | ||
|
||
![setup environment in vs code](../../static/img/setup-environment.png) | ||
|
||
In a future version of Runme, we'd like to support "execution groups," so that you can execute all of the above scripts in one go! | ||
|
||
### Authentication | ||
|
||
Interactive terminals are perfect for providing a CLI login to the user: | ||
|
||
![deploy application in vercel](../../static/img/deploy-in-vercel.png) | ||
|
||
### List Projects | ||
|
||
Remember, cells can capture the output of commands in non-interactive mode! | ||
|
||
In this case, this can be used to get a list of the user's current registered projects with the Vercel platform. | ||
|
||
![list projects in vercel](../../static/img/list-projects-vercel.png) | ||
|
||
![run hello world in vs code](../../static/img/run-hello-world.gif) |
42 changes: 42 additions & 0 deletions
42
docs/integrations/Running CLI in Github Actions Workflow.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
sidebar_position: 5 | ||
title: Runme CLI in Github Actions Workflows | ||
--- | ||
|
||
import Infobox from "../../src/components/Infobox.tsx" | ||
|
||
# Running CLI in Github Actions Workflow | ||
|
||
Runme offers a convenient GitHub action that seamlessly integrates the tool into your CI/CD pipeline. By re-using the workflows your contributors use in CI/CD, you can ensure that your contribution guidelines are up-to-date and still relevant. | ||
|
||
### Setup | ||
|
||
In `.github/workflows/test.yaml` create a new file with the following contents: | ||
|
||
```sh | ||
name: Test Changes | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone Repository | ||
uses: actions/checkout@v2 | ||
- name: Setup Node version | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18.x | ||
- name: Install dependencies | ||
run: npm ci | ||
# execute workflows through Runme | ||
- name: Build / Test Project | ||
uses: stateful/runme-action@v2 | ||
with: | ||
workflows: | | ||
build | ||
test | ||
``` | ||
|
||
Now, you can define what should be done for building and testing your project in e.g. a `CONTRIBUTING.md` and have your contributors be able to run the same flows through the CLI, e.g. via: `runme run build test`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
sidebar_position: 3 | ||
title: Integrations | ||
--- | ||
|
||
import Infobox from "../../src/components/Infobox.tsx" | ||
import EnvironmentOptions from "../../src/components/EnvironmentOptions.tsx" | ||
|
||
Previously, you learned the essential editing tools for creating and editing README files. | ||
|
||
This guide exposes a few ways to integrate Runme with different environments or 3rd party services. | ||
|
||
Here are some examples | ||
|
||
* Runme with Fresh App on Deno Cloud | ||
* Runme with Next.js App on Vercel | ||
* Running Runme CLI in Github Action | ||
* Running Github Action Inside a Markdown File |
79d1d0f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
docs-runme-dev – ./
docs-runme-dev-stateful.vercel.app
docs.runme.dev
docs-runme-dev-git-main-stateful.vercel.app
docs-runme-dev.vercel.app