-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (48 loc) · 1.62 KB
/
deploy-dev.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
49
50
51
52
name: deploy-dev
on:
workflow_dispatch:
concurrency: ${{ github.head_ref || github.ref_name }}
jobs:
build-api:
uses: jbrunton/workflows/.github/workflows/build-image.yml@develop
with:
repo-name: jbrunton/chat-demo-api
working-directory: services/api
buildpack: paketo-buildpacks/nodejs
publish: true
docker-username: jbrunton
cache-image: jbrunton/chat-demo-api-cache-image:latest
secrets:
docker-access-token: ${{ secrets.DOCKER_ACCESS_TOKEN }}
deploy-app:
environment:
name: Development
url: https://chat-demo-$${{ github.head_ref || github.ref_name }}.dev.jbrunton-aws.com
needs: [build-api]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build Client
env:
VITE_API_URL: https://chat-demo-api-${{ github.head_ref || github.ref_name }}.dev.jbrunton-aws.com
run: |
npm ci
npm run build
working-directory: client
- run: npm ci
working-directory: pulumi
- uses: pulumi/actions@v3
with:
command: up
stack-name: ${{ github.head_ref || github.ref_name }}
upsert: true
work-dir: pulumi
comment-on-pr: true
github-token: ${{ secrets.CI_MINION_PAT }}
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-1
API_TAG: ${{ needs.build-api.outputs.tag }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}