-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (40 loc) · 1.66 KB
/
server.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
name: server CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
env:
SECRET_KEY: ${{ secrets.env }}
- name: Install packages
run: echo "npm install"
# run: |
# cd ./server/Express
# yarn install --no-lockfile
# - name: Environment setup
# run: |
# cd ./server/Express/src/config
# printf "SECRET_KEY=${{ secrets.SECRET_KEY }}\nPORT=${{ secrets.PORT }}\nATLAS_URI=${{ secrets.ATLAS_URI }}\nCLIENT_ID=${{ secrets.CLIENT_ID }}\nCLIENT_SECRET=${{ secrets.CLIENT_SECRET }}\nS3_ACCESS_KEY_ID=${{ secrets.S3_ACCESS_KEY_ID }}\nSECRET_S3_ACCESS_KEY=${{ secrets.SECRET_S3_ACCESS_KEY }}\nS3_BUCKET_REGION=${{ secrets.S3_BUCKET_REGION }}\nRECAPTCHA_SITE_KEY=${{ secrets.RECAPTCHA_SITE_KEY }}\nRECAPTCHA_SECRET_KEY=${{ secrets.RECAPTCHA_SECRET_KEY }}\nTOKEN_LENGTH=${{ secrets.TOKEN_LENGTH }}\nEMAIL_SERVICE=${{ secrets.EMAIL_SERVICE }}\nUSER_EMAIL=${{ secrets.USER_EMAIL }}\nUSER_PASSWORD=${{ secrets.USER_PASSWORD }}\nNODE_ENV=${{ secrets.NODE_ENV }}\n" > .env
# cat .env
# - name: Code Testing
# run: |
# cd ./server/Express
# yarn run test
# - name: Run production server
# run: |
# cd ./server/Express
# yarn start
# - name: Restart services
# run: |
# cd ./server/Express
# yarn run restart
# sudo service nginx restart