Skip to content

Commit 3285848

Browse files
fagundesjgmarcodmc
authored andcommitted
feat: dev and staging gh actions
1 parent 0210fb2 commit 3285848

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

.github/workflows/dev.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [develop]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: setup node js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: 18.18.x
18+
19+
- run: npm install
20+
21+
- name: Create .env file
22+
run: |
23+
touch .env
24+
echo VITE_API_URL=${{ secrets.DEV_VITE_API_URL }} >> .env
25+
cat .env
26+
27+
- run: npm run build
28+
29+
- uses: aws-actions/configure-aws-credentials@v1
30+
with:
31+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
32+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
33+
aws-region: sa-east-1
34+
- run: aws s3 sync ./dist s3://dev.sos-rs.com

.github/workflows/staging.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [staging]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: setup node js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: 18.18.x
18+
19+
- run: npm install
20+
21+
- name: Create .env file
22+
run: |
23+
touch .env
24+
echo VITE_API_URL=${{ secrets.STG_VITE_API_URL }} >> .env
25+
cat .env
26+
27+
- run: npm run build
28+
29+
- uses: aws-actions/configure-aws-credentials@v1
30+
with:
31+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
32+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
33+
aws-region: sa-east-1
34+
- run: aws s3 sync ./dist s3://stg.sos-rs.com

0 commit comments

Comments
 (0)