Skip to content

Commit

Permalink
feat: new site build
Browse files Browse the repository at this point in the history
  • Loading branch information
Joey Guerra committed Oct 14, 2023
1 parent d93bee7 commit 49dd431
Show file tree
Hide file tree
Showing 15 changed files with 144 additions and 114 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/sfab-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Sample workflow for building and deploying a sfab site to GitHub Pages
name: Deploy sfab with GitHub Pages dependencies preinstalled

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Use Node.js and Build with sfab
uses: actions/setup-node@v3
with:
node-version: latest
- run: npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v2

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ node_modules
.nyc_output/
npm-debug.log
coverage/
dist
_site
12 changes: 7 additions & 5 deletions docs/adapters.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,22 @@ Adapters are the interface to the service you want your hubot to run on.

Hubot includes two official adapters:

* [Shell](./adapters/shell.md), i.e. for use with development
* [Campfire](./adapters/campfire.md)
* [Shell](./adapters/shell.html), i.e. for use with development
* [Campfire](./adapters/campfire.html)

There are Third-party adapters available for most chat services. Here are the most popular ones:

* [Discord](https://github.com/hubot-friends/hubot-discord)
* [IRC](https://github.com/hubot-friends/hubot-irc)
* [Slack](https://github.com/hubot-friends/hubot-slack)
* [MS Teams](https://github.com/hubot-friends/hubot-ms-teams)
* [Gitter](https://github.com/huafu/hubot-gitter2)
* [HipChat](https://github.com/hipchat/hubot-hipchat)
* [IRC](https://github.com/nandub/hubot-irc)
* [Rocket.Chat](https://github.com/RocketChat/hubot-rocketchat)
* [Slack](https://github.com/slackhq/hubot-slack)
* [XMPP](https://github.com/markstory/hubot-xmpp)

Browse all [repositories with the `hubot-adapter` topic on GitHub](https://github.com/search?q=topic%3Ahubot-adapter&type=Repositories) or [search for adapters on NPM](https://www.npmjs.com/search?q=hubot%20adapter&ranking=popularity). Add the `hubot-adapter` [topic](https://help.github.com/articles/classifying-your-repository-with-topics/) to your repository on GitHub to include it in this list.

## Writing Your Own Adapter

Interested in adding your own adapter? Check out our documentation for [developing adapters](./adapters/development.md)
Interested in adding your own adapter? Check out our documentation for [developing adapters](./adapters/development.html)
17 changes: 5 additions & 12 deletions docs/adapters/campfire.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,19 @@ permalink: /adapters/campfire.html

# Campfire adapter

[Campfire](http://campfirenow.com/) is a web based chat application built by
[37signals](http://37signals.com). The Campfire adapter is one of the original
adapters in Hubot.
[Campfire](http://campfirenow.com/) is a web based chat application built by [37signals](http://37signals.com). The Campfire adapter is one of the original adapters in Hubot.

## Getting Started

You will need a Campfire account to start, which you can
[sign up for free](https://signup.37signals.com/campfire/free/signup/new).
You will need a Campfire account to start.

Next, you will need to create a user on your Campfire account for your Hubot,
then give it access so it can join to your rooms. You will need to create a room
if you haven't already.
Next, you will need to create a user on your Campfire account for your Hubot, then give it access so it can join to your rooms. You will need to create a room if you haven't already.

Hubot defaults to using its [shell](./shell.md), so to use Campfire instead, you
can run hubot with `-a campfire`:
Hubot defaults to using its [shell](./shell.html), so to use Campfire instead, you can run hubot with `-a campfire`:

% bin/hubot -a campfire

If you are deploying to Heroku or using foreman, you need to make
sure the hubot is called with `-a campfire` in the `Procfile`:
If you are deploying to Heroku or using foreman, you need to make sure the hubot is called with `-a campfire` in the `Procfile`:

web: bin/hubot -a campfire -n Hubot

Expand Down
6 changes: 3 additions & 3 deletions docs/adapters/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ exports.use = (robot) => new Sample(robot)
}
```

7. Generate your Hubot using the `yo hubot` [command](https://hubot.github.com/docs/)
7. Generate your Hubot using the `npx hubot --create myhubot`
8. Change working directories to the `hubot` you created in step 7.
9. Now perform an `npm link` to add your adapter to `hubot`
- `npm link ../hubot-sample`
Expand Down Expand Up @@ -117,10 +117,10 @@ Another option is to load the file from local disk.
"dependencies": {
},
"peerDependencies": {
"hubot": ">=4.2.0"
"hubot": ">=9"
},
"devDependencies": {
"coffeescript": ">=1.2.0"
"coffeescript": ">=2.7.0"
}
```

Expand Down
10 changes: 5 additions & 5 deletions docs/deploying.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ permalink: /deploying.html

# Deploying

- [Azure](./deploying/azure.md)
- [Bluemix](./deploying/bluemix.md)
- [Heroku](./deploying/heroku.md)
- [Unix](./deploying/unix.md)
- [Windows](./deploying/windows.md)
- [Azure](./deploying/azure.html)
- [Bluemix](./deploying/bluemix.html)
- [Heroku](./deploying/heroku.html)
- [Unix](./deploying/unix.html)
- [Windows](./deploying/windows.html)
6 changes: 3 additions & 3 deletions docs/deploying/azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ permalink: /deploying/azure.html

# Deploying to Azure

If you've been following along with [Getting Started](../index.md), it's time to deploy so you can use it beyond just your local machine.
[Azure](http://azure.microsoft.com/) is a way to deploy hubot as an alternative to [Heroku](heroku.md).
If you've been following along with [Getting Started](../index.html), it's time to deploy so you can use it beyond just your local machine.
[Azure](http://azure.microsoft.com/) is a way to deploy hubot as an alternative to [Heroku](heroku.html).

You will need to install the azure-cli via npm after you have follow the initial instructions for your hubot.

Expand Down Expand Up @@ -71,7 +71,7 @@ Finally, add one more environment variables to your website. You can do this eit
% $settings["HUBOT_BRAIN_AZURE_CONNSTRING"] = "your Azure blob storage connection string"
% Set-AzureWebsite -AppSettings $settings mynewhubot

Now any scripts that require a brain will function. You should look up other scripts or write your own by looking at the [documentation](../scripting.md). All of the normal scripts for hubot are compatible with hosting hubot on Azure.
Now any scripts that require a brain will function. You should look up other scripts or write your own by looking at the [documentation](../scripting.html). All of the normal scripts for hubot are compatible with hosting hubot on Azure.

### Troubleshooting tips and tricks

Expand Down
4 changes: 2 additions & 2 deletions docs/deploying/bluemix.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ permalink: /deploying/bluemix.html

# Deploying to Bluemix

If you've been following along with [Getting Started](../index.md), it's time
If you've been following along with [Getting Started](../index.html), it's time
to deploy so you can use it beyond just your local machine.
[IBM Bluemix](http://bluemix.net) is a way to deploy hubot as an alternative to
[Heroku](heroku.md). It is built on the open-source project
[Heroku](heroku.html). It is built on the open-source project
[Cloud Foundry](https://www.cloudfoundry.org/), so we'll be using the `cf cli`
throughout these examples.

Expand Down
4 changes: 2 additions & 2 deletions docs/deploying/heroku.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ permalink: /deploying/heroku.html

# Deploying to Heroku

If you've been following along with [Getting Started](../index.md), it's time to deploy so you can use it beyond just your local machine.
If you've been following along with [Getting Started](../index.html), it's time to deploy so you can use it beyond just your local machine.
[Heroku](http://www.heroku.com/) is an easy and supported way to deploy hubot.

Install the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli) to start, then follow their '[Getting Started](https://devcenter.heroku.com/articles/heroku-cli#getting-started)' instructions, including logging in the first time:
Expand Down Expand Up @@ -35,7 +35,7 @@ Then create a Heroku application:

Before you deploy the application, you'll need to configure some environment
variables for hubot to use. The specific variables you'll need depends on which
[adapter](../adapters.md) and scripts you are using. For Campfire, with no other
[adapter](../adapters.html) and scripts you are using. For Campfire, with no other
scripts, you'd need to set the following environment variables:

% heroku config:set HUBOT_CAMPFIRE_ACCOUNT=yourcampfireaccount
Expand Down
2 changes: 1 addition & 1 deletion docs/deploying/unix.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ for [installing Node.js via package manager](https://github.com/joyent/node/wiki
## Updating code on the server

The simplest way to update your hubot's code is going to be to have a git
checkout of your hubot's source code (that you've created during [Getting Started](../index.md), not the [github/hubot repository](http://github.com/github/hubot), and just git pull to get change. This may
checkout of your hubot's source code (that you've created during [Getting Started](../index.html), not the [github/hubot repository](http://github.com/github/hubot), and just git pull to get change. This may
feel a dirty hack, but it works when you are starting out.

If you have a Ruby background, you might be more comfortable using
Expand Down
2 changes: 1 addition & 1 deletion docs/deploying/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Your other option is to install directly from [NodeJS](https://nodejs.org/) and

## Updating code on the server

To get the code on your server, you can follow the instructions at [Getting Started](../index.md) on your local development machine or directly on the server. If you are building locally, push your hubot to GitHub and clone the repo onto your server. Don't clone the normal [github/hubot repository](http://github.com/github/hubot), make sure you're using the Yo Generator to build your own hubot.
To get the code on your server, you can follow the instructions at [Getting Started](../index.html) on your local development machine or directly on the server. If you are building locally, push your hubot to GitHub and clone the repo onto your server. Don't clone the normal [github/hubot repository](http://github.com/github/hubot), make sure you're using `npx hubot --create myhubot` to build your own hubot.

## Setting up environment vars

Expand Down
18 changes: 9 additions & 9 deletions docs/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Now open `package.json` in your code editor and add a `start` property to the `s
}
```

Start your Hubot instance by executing `npm start`. It will start with the built in [shell adapter](./adapters/shell.md), which starts a [REPL](https://en.wikipedia.org/wiki/Read–eval–print_loop) where you can type commands.
Start your Hubot instance by executing `npm start`. It will start with the built in [shell adapter](/adapters/shell.html), which starts a [REPL](https://en.wikipedia.org/wiki/Read–eval–print_loop) where you can type commands.

Your terminal should look like:

Expand Down Expand Up @@ -89,21 +89,21 @@ To use a script from an NPM package:
3. Run `npm home <package-name>` to open a browser window for the homepage of the script, where you can find more information about configuring and installing the script.
You can also create your own scripts and save them in a folder called `./scripts/` (`./` means current working directory) in your codebase directory. All scripts (files ending with `.js` and `.mjs`) placed there are automatically loaded and ready to use with your hubot. Read more about customizing hubot by [writing your own scripts](scripting.md).
You can also create your own scripts and save them in a folder called `./scripts/` (`./` means current working directory) in your codebase directory. All scripts (files ending with `.js` and `.mjs`) placed there are automatically loaded and ready to use with your hubot. Read more about customizing hubot by [writing your own scripts](scripting.html).
## Adapters
Hubot uses the adapter pattern to support multiple chat-backends. Here is a [list of available adapters](adapters.md), along with details on how to configure them. Please note that Hubot is undergoing major changes and old adapters may no longer work with the latest version of Hubot (anything after 3.5).
Hubot uses the adapter pattern to support multiple chat-backends. Here is a [list of available adapters](adapters.html), along with details on how to configure them. Please note that Hubot is undergoing major changes and old adapters may no longer work with the latest version of Hubot (anything after 3.5).
## Deploying
You can deploy hubot to Heroku, which is the officially supported method. Additionally you are able to deploy hubot to a UNIX-like system or Windows. Please note the support for deploying to Windows isn't officially supported.

* [Deploying Hubot onto Azure](./deploying/azure.md)
* [Deploying Hubot onto Bluemix](./deploying/bluemix.md)
* [Deploying Hubot onto Heroku](./deploying/heroku.md)
* [Deploying Hubot onto Unix](./deploying/unix.md)
* [Deploying Hubot onto Windows](./deploying/windows.md)
* [Deploying Hubot onto Azure](./deploying/azure.html)
* [Deploying Hubot onto Bluemix](./deploying/bluemix.html)
* [Deploying Hubot onto Heroku](./deploying/heroku.html)
* [Deploying Hubot onto Unix](./deploying/unix.html)
* [Deploying Hubot onto Windows](./deploying/windows.html)

## Redis

Expand All @@ -130,4 +130,4 @@ or

## Patterns

Using custom scripts, you can quickly customize Hubot to be the most life embettering robot he or she can be. Read [docs/patterns.md](patterns.md) for some nifty tricks that may come in handy as you teach your hubot new skills.
Using custom scripts, you can quickly customize Hubot to be the most life embettering robot he or she can be. Read [docs/patterns](patterns.html) for some nifty tricks that may come in handy as you teach your hubot new skills.
8 changes: 4 additions & 4 deletions docs/patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ When you rename Hubot, he will no longer respond to his former name. In order to

Setting this up is very easy:

1. Create a [bundled script](scripting.md) in the `scripts/` directory of your Hubot instance called `rename-hubot.js`
1. Create a [bundled script](scripting.html) in the `scripts/` directory of your Hubot instance called `rename-hubot.js`
2. Add the following code, modified for your needs:

```javascript
Expand Down Expand Up @@ -53,7 +53,7 @@ This pattern is similar to the Renaming the Hubot Instance pattern above:

Here is the setup:

1. Create a [bundled script](scripting.md) in the `scripts/` directory of your Hubot instance called `deprecations.js`
1. Create a [bundled script](scripting.html) in the `scripts/` directory of your Hubot instance called `deprecations.js`
2. Copy any old command listeners and add them to that file. For example, if you were to rename the help command for some silly reason:

```javascript
Expand All @@ -75,7 +75,7 @@ module.exports = (robot) => {

Sometimes you have scripts that take several minutes to execute. If these scripts are doing something that could be interfered with by running subsequent commands, you may wish to code your scripts to prevent concurrent access.

To do this, you can set up a lock in the Hubot [brain](scripting.md#persistence) object. The lock is set up here so that different scripts can share the same lock if necessary.
To do this, you can set up a lock in the Hubot [brain](scripting.html#persistence) object. The lock is set up here so that different scripts can share the same lock if necessary.

Setting up the lock looks something like this:

Expand Down Expand Up @@ -110,7 +110,7 @@ In many corporate environments, a web proxy is required to access the Internet a
Due to the way Node.js handles HTTP and HTTPS requests, you need to specify a different Agent for each protocol. ScopedHTTPClient will then automatically choose the right ProxyAgent for each request.
1. Install ProxyAgent. `npm install proxy-agent`
2. Create a [bundled script](scripting.md) in the `scripts/` directory of your Hubot instance called `proxy.js`
2. Create a [bundled script](scripting.html) in the `scripts/` directory of your Hubot instance called `proxy.js`
3. Add the following code, modified for your needs:
```javascript
Expand Down
Loading

0 comments on commit 49dd431

Please sign in to comment.