Add caching for node_modules and rename environment deploy status

This commit is contained in:
Alicia Sykes 2023-08-31 20:46:01 +01:00
parent 33e1adb974
commit b314168da1

View File

@ -26,12 +26,20 @@ jobs:
with:
node-version: 16
- uses: chrnorm/deployment-action@releases/v1
name: Create GitHub deployment for API
- name: Cache node_modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Create GitHub deployment for API
uses: chrnorm/deployment-action@releases/v1
id: deployment_api
with:
token: ${{ secrets.BOT_TOKEN || secrets.GITHUB_TOKEN }}
environment: api
environment: AWS (Backend API)
ref: ${{ github.ref }}
- name: Install Serverless CLI and dependencies
@ -66,12 +74,20 @@ jobs:
with:
node-version: 16
- uses: chrnorm/deployment-action@releases/v1
name: Create GitHub deployment for Frontend
- name: Cache node_modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Create GitHub deployment for Frontend
uses: chrnorm/deployment-action@releases/v1
id: deployment_frontend
with:
token: ${{ secrets.BOT_TOKEN || secrets.GITHUB_TOKEN }}
environment: frontend
environment: AWS (Frontend Web UI)
ref: ${{ github.ref }}
- name: Install dependencies and build