-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.49 KB
/
deployment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Slack App Deployment
# Deploy the latest revision of this repo to Slack platform when:
on:
push:
branches: [ main ]
jobs:
build:
# You can go with any other Linux options if you prefer
runs-on: ubuntu-latest
# The deployment process itself usually takes less than 1 minute
# When your app's code base is larger in the future, you may want to adjust this duration
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
# Slack CLI requires Deno runtime
- name: Install Deno runtime
uses: denoland/setup-deno@v1
with:
# Using the latest stable version along with Slack CLI is recommend
deno-version: v1.x
- name: Cache Slack CLI installation
id: cache-slack
uses: actions/cache@v3
with:
path: |
/usr/local/bin/slack
~/.slack/bin/slack
key: ${{ runner.os }}-slack
- name: Install Slack CLI
if: steps.cache-slack.outputs.cache-hit != 'true'
run: |
curl -fsSL https://downloads.slack-edge.com/slack-cli/install.sh | bash
- name: Deploy the app
env:
# you can obtain this token string (xoxp-...) by running `slack auth token`
# Note that this token is connected to a specific Slack workspace/org
SLACK_SERVICE_TOKEN: ${{ secrets.SLACK_SERVICE_TOKEN }}
run: |
# If you place the code in the top directory, there's no need to use this command
cd gh-actions-demo/
slack deploy -s --token $SLACK_SERVICE_TOKEN