Skip to content

Commit 92f9a48

Browse files
committed
WIP
1 parent f24042c commit 92f9a48

File tree

2 files changed

+10
-65
lines changed

2 files changed

+10
-65
lines changed

.github/workflows/deploy-to-aws.yaml

Lines changed: 8 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -10,70 +10,13 @@ on:
1010
workflow_dispatch:
1111

1212
jobs:
13-
call-test-workflow:
14-
uses: GNS-Science/nshm-github-actions/.github/workflows/python-run-tests.yml@main
13+
# call-test-workflow:
14+
# uses: ./.github/workflows/dev.yml
15+
# secrets: inherit
16+
17+
call-deploy-workflow:
18+
# needs: call-test-workflow
19+
uses: GNS-Science/nshm-github-actions/.github/workflows/deploy-to-aws.yml@feature/16-deploy-to-aws
1520
with:
16-
operating-systems: "['ubuntu-latest']"
17-
python-versions: "['3.10']"
21+
python-version: '3.10'
1822
secrets: inherit
19-
20-
deploy:
21-
needs: call-test-workflow
22-
runs-on: ubuntu-latest
23-
strategy:
24-
matrix:
25-
node-version: [20]
26-
python-version: ['3.10']
27-
28-
steps:
29-
- uses: actions/checkout@v4
30-
- uses: actions/setup-python@v4
31-
with:
32-
python-version: ${{ matrix.python-version }}
33-
34-
- name: Install and configure Poetry
35-
uses: GNS-Science/install-poetry@main
36-
with:
37-
virtualenvs-create: true
38-
virtualenvs-in-project: true
39-
installer-parallel: true
40-
41-
- name: Use Node.js ${{ matrix.node-version }}
42-
uses: actions/setup-node@v4
43-
with:
44-
node-version: ${{ matrix.node-version }}
45-
check-latest: true
46-
47-
- name: upgrade NPM
48-
run: npm install --location=global npm@latest
49-
50-
# - name: Verify NPM
51-
# run: npm doctor
52-
53-
- name: Install Dependencies
54-
run: npm install
55-
56-
- name: List packages
57-
run: npm ls
58-
59-
- name: Serverless Doctor
60-
run: npm run-script sls_doctor
61-
62-
- name: Configure AWS Credentials
63-
uses: aws-actions/configure-aws-credentials@v4
64-
with:
65-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
66-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
67-
aws-region: ap-southeast-2
68-
69-
- name: Serverless Deploy ....
70-
env:
71-
ENABLE_METRICS: 0
72-
run: |
73-
poetry self add poetry-plugin-export
74-
if [[ "${{github.base_ref}}" == "main" || "${{github.ref}}" == 'refs/heads/main' ]]; then
75-
STAGE=prod npm run-script deploy
76-
else
77-
STAGE=test npm run-script deploy
78-
fi
79-

.github/workflows/dev.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88

99
# Allows you to run this workflow manually from the Actions tab
1010
workflow_dispatch:
11+
# Allows us to call the workflow from another workflow
12+
workflow_call:
1113

1214
jobs:
1315
call-test-workflow:

0 commit comments

Comments
 (0)