Update the docs about GitHub Actions

This commit is contained in:
Michael Mintz 2020-09-04 22:29:49 -04:00
parent 0e396e52d7
commit 1f3fed51b1
3 changed files with 29 additions and 32 deletions

View File

@ -2,3 +2,4 @@
> **Table of Contents / Navigation:**
> - [**Actions/Workflows**](https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/github/workflows/ReadMe.md)
> - [**Extras/Action-Integrations**](https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/github/workflows/extras.md)

View File

@ -51,35 +51,3 @@
### Congratulations! You now know how to create and run browser tests with GitHub Actions/Workflows!
### **Study [SeleniumBase](https://github.com/seleniumbase/SeleniumBase) to learn more!**
----------
----------
### **Integrations for GitHub Actions:**
### Slack Notifications - [rtCamp/action-slack-notify](https://github.com/rtCamp/action-slack-notify) can be used to send notifications to Slack.
**Usage:**
* Create a slack integration webhook if you don't have one already.
* Create a ``SLACK_WEBHOOK`` secret on your repository with the webhook token value.
* For this particular action, ``SLACK_CHANNEL`` is an optional environment variable that defaults to the webhook token channel if not specified.
* The following example shows how to put a link to your workflow as the ``SLACK_MESSAGE`` (Lets you see artifacts pushed up, such as from the SeleniumBase Presenter feature!):
```
- name: Slack notification
uses: rtCamp/action-slack-notify@master
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: general
SLACK_ICON_EMOJI: rocket
SLACK_USERNAME: SeleniumBase
SLACK_MESSAGE: 'Actions workflow completed successful! :tada: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'
```
### Uploading Artifacts:
* Here's an example using [upload-artifact@v2](https://github.com/actions/upload-artifact) to push up a SeleniumBase-generated presentation as an artifact. (You can use this together with the Slack notification action to view the presentation directly from GitHub)
```
- uses: actions/upload-artifact@v2
with:
name: Click to download the presentation
path: saved_presentations/my_presentation.html
```

View File

@ -0,0 +1,28 @@
### <img src="https://seleniumbase.io/img/sb_icon.png" title="SeleniumBase" width="30" /> Integrations for GitHub Actions:
### Uploading Artifacts:
* Here's an example using [upload-artifact@v2](https://github.com/actions/upload-artifact) to push up a SeleniumBase-generated artifact.
```
- uses: actions/upload-artifact@v2
with:
name: Click to download the presentation
path: saved_presentations/my_presentation.html
```
### Slack Notifications - [rtCamp/action-slack-notify](https://github.com/rtCamp/action-slack-notify) can be used to send notifications to Slack.
**Usage:**
* Create a slack integration webhook if you don't have one already.
* Create a ``SLACK_WEBHOOK`` secret on your repository with the webhook token value.
* For this particular action, ``SLACK_CHANNEL`` is an optional environment variable that defaults to the webhook token channel if not specified.
* The following example shows how to put a link to your workflow as the ``SLACK_MESSAGE`` (Lets you see artifacts pushed up, such as from the SeleniumBase Presenter feature!):
```
- name: Slack notification
uses: rtCamp/action-slack-notify@master
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: general
SLACK_ICON_EMOJI: rocket
SLACK_USERNAME: SeleniumBase
SLACK_MESSAGE: 'Actions workflow completed successful! :tada: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'
```