Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 322f25a

Browse files
Inital GitHub Actions Workflows
1 parent d1c7fd7 commit 322f25a

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

‎.github/workflows/dev-stage.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Deploy Dev Stage
2+
3+
on:
4+
# push:
5+
# branches: [ dev ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
env:
12+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
13+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
14+
API_KEY: ${{ secrets.NEON_API_KEY }}
15+
STAGE: dev
16+
GH_TOKEN: ${{ github.token }}
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
- name: Use Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: "20.11"
25+
cache: 'npm'
26+
- name: Install dependencies
27+
run: npm install
28+
- name: Install neonctl and tsx
29+
run: npm install -g neonctl tsx
30+
- name: Delete Previous Branch
31+
run: neonctl branches delete dev --api-key ${{ env.API_KEY }}
32+
continue-on-error: true
33+
- name: Create Branched Database
34+
run: neonctl branches create --name dev --api-key ${{ env.API_KEY }}
35+
- name: Branch Connection String in Parameter Store
36+
run: |
37+
export DB_URL=$(neonctl connection-string --branch dev --api-key ${{ env.API_KEY }})
38+
npx tsx src/cli/putSecrets.js dev $DB_URL
39+
- name: Branch Info
40+
run: |
41+
export PR_BRANCH=$(git branch --show-current)
42+
export DEFAULT_BRANCH=$(git remote show origin | awk '/HEAD branch/ {print $NF}')
43+
echo "$PR_BRANCH and $DEFAULT_BRANCH"

‎.github/workflows/prod-stage.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Deploy Production App
2+
3+
on:
4+
# pull_request:
5+
# types: [ closed ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
# if: github.event.pull_request.merged == true
11+
runs-on: ubuntu-latest
12+
env:
13+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
14+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Use Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: "20.11"
21+
cache: 'npm'
22+
- name: Install dependencies
23+
run: npm install
24+
- name: Deploy
25+
run: npm run deploy

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /