Skip to content

Commit a289fdf

Browse files
Merge pull request #4 from huynhducthanhtuan/feature/test-deploy
Setup job to deploy project to Render
2 parents d575ce2 + 364ecb8 commit a289fdf

File tree

2 files changed

+31
-19
lines changed

2 files changed

+31
-19
lines changed

.github/workflows/create-env.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Deploy project to Render
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
create-env-file:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout Repository
14+
uses: actions/checkout@v3
15+
16+
- name: Create .env file
17+
run: |
18+
echo "PORT=${{ secrets.PORT }}" >> .env
19+
echo "MONGODB_URI=${{ secrets.MONGODB_URI }}" >> .env
20+
21+
- name: Deploy project to Render
22+
uses: JorgeLNJunior/render-deploy@v1.4.4
23+
with:
24+
service_id: ${{ secrets.RENDER_SERVICE_ID }}
25+
api_key: ${{ secrets.RENDER_API_KEY }}
26+
clear_cache: true
27+
wait_deploy: true
28+
github_deployment: true
29+
deployment_environment: 'production'
30+
github_token: ${{ secrets.GITHUB_TOKEN }}
31+

0 commit comments

Comments
 (0)