|
10 | 10 | workflow_dispatch: |
11 | 11 |
|
12 | 12 | 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 |
15 | 20 | with: |
16 | | - operating-systems: "['ubuntu-latest']" |
17 | | - python-versions: "['3.10']" |
| 21 | + python-version: '3.10' |
18 | 22 | 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 | | -
|
0 commit comments