mirror of
https://github.com/Lissy93/web-check.git
synced 2025-05-22 15:10:43 +02:00
Add caching for node_modules and rename environment deploy status
This commit is contained in:
parent
33e1adb974
commit
b314168da1
30
.github/workflows/deploy-aws.yml
vendored
30
.github/workflows/deploy-aws.yml
vendored
@ -26,12 +26,20 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 16
|
||||||
|
|
||||||
- uses: chrnorm/deployment-action@releases/v1
|
- name: Cache node_modules
|
||||||
name: Create GitHub deployment for API
|
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
|
id: deployment_api
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.BOT_TOKEN || secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.BOT_TOKEN || secrets.GITHUB_TOKEN }}
|
||||||
environment: api
|
environment: AWS (Backend API)
|
||||||
ref: ${{ github.ref }}
|
ref: ${{ github.ref }}
|
||||||
|
|
||||||
- name: Install Serverless CLI and dependencies
|
- name: Install Serverless CLI and dependencies
|
||||||
@ -65,13 +73,21 @@ jobs:
|
|||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 16
|
||||||
|
|
||||||
|
- name: Cache node_modules
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: node_modules
|
||||||
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-yarn-
|
||||||
|
|
||||||
- uses: chrnorm/deployment-action@releases/v1
|
- name: Create GitHub deployment for Frontend
|
||||||
name: Create GitHub deployment for Frontend
|
uses: chrnorm/deployment-action@releases/v1
|
||||||
id: deployment_frontend
|
id: deployment_frontend
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.BOT_TOKEN || secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.BOT_TOKEN || secrets.GITHUB_TOKEN }}
|
||||||
environment: frontend
|
environment: AWS (Frontend Web UI)
|
||||||
ref: ${{ github.ref }}
|
ref: ${{ github.ref }}
|
||||||
|
|
||||||
- name: Install dependencies and build
|
- name: Install dependencies and build
|
||||||
@ -108,4 +124,4 @@ jobs:
|
|||||||
state: "${{ job.status }}"
|
state: "${{ job.status }}"
|
||||||
deployment_id: ${{ steps.deployment_frontend.outputs.deployment_id }}
|
deployment_id: ${{ steps.deployment_frontend.outputs.deployment_id }}
|
||||||
ref: ${{ github.ref }}
|
ref: ${{ github.ref }}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user