-
Notifications
You must be signed in to change notification settings - Fork 7
50 lines (46 loc) · 1.33 KB
/
deploy.yaml
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
49
50
name: deploy-probot
on:
workflow_dispatch:
push:
branches: main
paths:
- "src/**"
- "package*.json"
- "serverless.yaml"
- ".github/workflows/deploy.yaml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
id-token: write
contents: read
jobs:
deploy:
name: Deploy Probot Application
runs-on: ubuntu-latest
container: node:18
steps:
- name: Get AWS credentials
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: ${{ vars.SERVERLESS_AWS_ROLE_ARN }}
aws-region: ${{ vars.AWS_REGION }}
- name: Checkout code
uses: actions/checkout@v3
- name: Install npm dependencies
run: npm ci
- name: Install serverless framework
run: npm install -g serverless@3
- name: Test Probot
run: npm run test
- name: Build Probot
run: npm run build
- name: Copy release draft template
run: cp src/plugins/ReleaseDrafter/draft_template.njk dist/plugins/ReleaseDrafter
- name: Deploy Probot
run: npm run deploy
env:
APP_ID: ${{ secrets.APP_ID }}
WEBHOOK_SECRET: ${{ secrets.WEBHOOK_SECRET }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
GPUTESTER_PAT: ${{ secrets.GPUTESTER_PAT }}