forked from pulumi/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-and-deploy.yml
37 lines (33 loc) · 1.12 KB
/
build-and-deploy.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
name: Deploy OAuth Provider
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
deployOAuthProvider:
env:
GOPATH: ${{ github.workspace }}
name: Install deps and update infrastructure
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Pulumi CLI
uses: pulumi/action-install-pulumi-cli@releases/v1
- name: Install pulumi deps
run: yarn install --cwd infrastructure
- name: Preview infrastructure
if: ${{ github.event_name == 'pull_request' }}
env:
PULUMI_STACK: ${{ secrets.PULUMI_STACK}}
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
run:
pulumi preview --cwd infrastructure -s "${{ secrets.PULUMI_STACK }}"
- name: Deploy infrastructure
if: ${{ github.event_name == 'push' }}
env:
PULUMI_STACK: ${{ secrets.PULUMI_STACK}}
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
run: pulumi up --yes --cwd infrastructure -s "${{ secrets.PULUMI_STACK }}"