Skip to content

Commit

Permalink
update: Try to run CD on same job
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisGV04 committed Sep 14, 2023
1 parent 712ecaa commit b5b67f6
Showing 1 changed file with 10 additions and 36 deletions.
46 changes: 10 additions & 36 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@ on:
branches: ['main']

jobs:
deploy-cms:
deploy:
runs-on: self-hosted

defaults:
run:
working-directory: ./server

strategy:
matrix:
node-version: [18.x]
Expand All @@ -27,40 +23,18 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
cache-dependency-path: './server/pnpm-lock.yaml' # Needed to use multiple directories
- run: pnpm install
- name: Add envirnonment variables from base64
cache-dependency-path: '**/pnpm-lock.yaml' # Needed to use multiple directories
- name: Setup CMS
run: |
touch .env
echo "${{ secrets.CMS_ENV }}" | base64 --decode > .env
- run: pnpm build

deploy-client:
runs-on: self-hosted

defaults:
run:
working-directory: ./client

strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v3
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
cache-dependency-path: './client/pnpm-lock.yaml' # Needed to use multiple directories
- run: pnpm install
- name: Add envirnonment variables from base64
pnpm install
pnpm build
working-directory: ./server
- name: Setup Client
run: |
touch .env
echo "${{ secrets.CLIENT_ENV }}" | base64 --decode > .env
- run: pnpm build
pnpm install
pnpm build
working-directory: ./client

0 comments on commit b5b67f6

Please sign in to comment.