|
6 | 6 | - deploy-test |
7 | 7 | - main |
8 | 8 |
|
9 | | -jobs: |
10 | | - #call-test-workflow: |
11 | | - # # https://docs.github.com/en/actions/using-workflows/reusing-workflows#calling-a-reusable-workflow |
12 | | - # uses: ./.github/workflows/run-tests.yml |
13 | | - |
14 | | - deploy: |
15 | | - # needs: call-test-workflow |
16 | | - runs-on: ubuntu-latest |
17 | | - |
18 | | - steps: |
19 | | - - uses: actions/checkout@v4 |
20 | | - - uses: actions/setup-python@v5 |
21 | | - with: |
22 | | - python-version: "3.10" |
23 | | - |
24 | | - - name: Install and configure Poetry |
25 | | - uses: GNS-Science/install-poetry@main |
26 | | - with: |
27 | | - virtualenvs-create: true |
28 | | - virtualenvs-in-project: true |
29 | | - installer-parallel: true |
30 | | - |
31 | | - - name: Use Node.js ) |
32 | | - uses: actions/setup-node@v4 |
33 | | - with: |
34 | | - node-version: 20 |
35 | | - check-latest: true |
36 | | - |
37 | | - - name: upgrade NPM |
38 | | - run: npm install --location=global npm@latest |
39 | | - |
40 | | - - name: Verify NPM |
41 | | - run: npm doctor |
| 9 | + # Allows you to run this workflow manually from the Actions tab |
| 10 | + workflow_dispatch: |
42 | 11 |
|
43 | | - - name: Install Dependencies |
44 | | - run: npm install |
45 | | - |
46 | | - - name: List packages |
47 | | - run: npm ls |
48 | | - |
49 | | - - name: Serverless Doctor |
50 | | - run: npm run-script sls_doctor |
51 | | - |
52 | | - - name: Configure AWS Credentials |
53 | | - uses: aws-actions/configure-aws-credentials@v1 |
54 | | - with: |
55 | | - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} |
56 | | - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
57 | | - aws-region: ap-southeast-2 |
58 | | - |
59 | | - - name: Serverless Deploy .... |
60 | | - env: |
61 | | - ENABLE_METRICS: 1 |
62 | | - COLOR_SCALE_NORMALISATION: LIN |
63 | | - run: | |
64 | | - if [[ "${{github.base_ref}}" == "main" || "${{github.ref}}" == 'refs/heads/main' ]]; then |
65 | | - STAGE=prod npm run-script deploy |
66 | | - else |
67 | | - STAGE=test npm run-script deploy |
68 | | - fi |
| 12 | +jobs: |
69 | 13 |
|
| 14 | + call-test-workflow: |
| 15 | + uses: ./.github/workflows/dev.yml |
| 16 | + secrets: inherit |
| 17 | + |
| 18 | + call-deploy-workflow: |
| 19 | + needs: call-test-workflow |
| 20 | + uses: GNS-Science/nshm-github-actions/.github/workflows/deploy-to-aws.yml@main |
| 21 | + with: |
| 22 | + operating-system: 'ubuntu-latest' |
| 23 | + python-version: '3.10' |
| 24 | + smoketest-query: 'query QueryRoot{about}' |
| 25 | + secrets: inherit |
0 commit comments