-
Notifications
You must be signed in to change notification settings - Fork 2
96 lines (91 loc) · 3.18 KB
/
ci-cd-develop.yml
File metadata and controls
96 lines (91 loc) · 3.18 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: CI/CD Staging
on:
push:
branches:
- develop
jobs:
buildAndTest:
name: CI Pipeline
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['12.x']
steps:
- uses: actions/checkout@v2
with:
submodules: true
# Initialize Node.js
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
# Install project dependencies, test and build
- name: Install dependencies
run: npm install
- name: Run build
run: npm run build
- name: Run test
run: npm run test
# deploy:
# name: CD Pipeline
# runs-on: ubuntu-latest
# strategy:
# matrix:
# python-version: [3.8]
# node-version: ['12.x']
# appname: ['api']
# deploy-group: ['develop']
# s3-bucket: ['aws-deployments-bot-discord-develop']
# s3-filename: ['bot-discord-develop-${{ github.sha }}']
# needs: buildAndTest
# steps:
# - uses: actions/checkout@v2
# with:
# submodules: true
# # Initialize Node.js
# - name: Install Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v1
# with:
# node-version: ${{ matrix.node-version }}
# # Install project dependencies and build
# - name: Install dependencies
# run: npm install
# # Prevent files from having a timestamp before 1980
# - name: Patch dependencies
# run: find ./node_modules -mtime +10950 -exec touch {} \;
# - name: Run build:keys
# run: npm run build:keys
# - name: Run build
# run: npm run build
# # Install AWS CLI 2
# - name: Install AWS CLI 2
# run: |
# curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
# unzip awscliv2.zip
# sudo ./aws/install --update
# # Configure AWS credentials
# - name: Configure AWS credentials
# uses: aws-actions/configure-aws-credentials@v1
# with:
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# aws-region: eu-west-3
# # Deploy push to AWS S3
# - name: AWS Deploy push
# run: |
# aws deploy push \
# --application-name ${{ matrix.appname }} \
# --description "This is a revision for the ${{ matrix.appname }}-${{ github.sha }}" \
# --ignore-hidden-files \
# --s3-location s3://${{ matrix.s3-bucket }}/${{ matrix.s3-filename }}.zip \
# --source .
# # Create deployment to CodeDeploy
# - name: AWS Create Deployment
# run: |
# aws deploy create-deployment \
# --application-name ${{ matrix.appname }} \
# --deployment-config-name CodeDeployDefault.OneAtATime \
# --deployment-group-name ${{ matrix.deploy-group }} \
# --file-exists-behavior OVERWRITE \
# --s3-location bucket=${{ matrix.s3-bucket }},key=${{ matrix.s3-filename }}.zip,bundleType=zip \
# --ignore-application-stop-failures \