Skip to content

Commit

Permalink
feat: dev and staging gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
fagundesjg committed May 16, 2024
1 parent db00d2a commit 7398c9e
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on:
push:
branches: [develop]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: setup node js
uses: actions/setup-node@v4
with:
node-version: 18.18.x

- run: npm install

- name: Create .env file
run: |
touch .env
echo VITE_API_URL=${{ secrets.DEV_VITE_API_URL }} >> .env
cat .env
- run: npm run build

- 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: sa-east-1
- run: aws s3 sync ./dist s3://dev.sos-rs.com
34 changes: 34 additions & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on:
push:
branches: [staging]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: setup node js
uses: actions/setup-node@v4
with:
node-version: 18.18.x

- run: npm install

- name: Create .env file
run: |
touch .env
echo VITE_API_URL=${{ secrets.STG_VITE_API_URL }} >> .env
cat .env
- run: npm run build

- 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: sa-east-1
- run: aws s3 sync ./dist s3://stg.sos-rs.com

0 comments on commit 7398c9e

Please sign in to comment.