-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (48 loc) · 2.06 KB
/
deploy-landing-page.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
51
52
53
54
55
name: Deploy landing-page application
on:
push:
branches:
- PRODUCTION
paths:
- apps/landing-page/**
jobs:
deploy:
name: Deploy landing-page to AWS
runs-on: ubuntu-latest
steps:
- name: Setup Node environment
uses: Exlint/[email protected]
with:
should-cache: false
node-version: 20.18.1
package-manager: pnpm
package-manager-version: 8.14.1
sub-modules: false
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Build landing-page
run: pnpm exec nx build @exlint.io/landing-page
- name: Deploy to S3 and invalidate Cloudfront
uses: reggionick/s3-deploy@v4
with:
folder: ./apps/landing-page/out
bucket: ${{ secrets.LANDING_PAGE_AWS_S3_BUCKET }}
bucket-region: ${{ secrets.AWS_REGION }}
dist-id: ${{ secrets.LANDING_PAGE_AWS_CLOUDFRONT_DISTRIBUTION_ID }}
invalidation: /
delete-removed: true
private: true
filesToInclude: '**/*'
- name: Slack notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: dashboard-deployment
SLACK_MESSAGE: 'Just deployed landing-page'
SLACK_TITLE: 'Deployment'
SLACK_USERNAME: 'Yazif Deployer'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL_DASHBOARD_DEPLOYMENT }}
MSG_MINIMAL: true