Skip to content

Commit

Permalink
[TASK] Update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminkott committed Oct 17, 2024
1 parent e84fec6 commit 34d6ba7
Showing 1 changed file with 40 additions and 29 deletions.
69 changes: 40 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:

- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
Expand All @@ -25,9 +25,11 @@ jobs:

- name: Get Composer Cache Directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
run: |
echo "dir=$(composer config cache-files-dir)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v3
- name: Recover Composer caches
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -41,23 +43,25 @@ jobs:
run: |
composer cgl:ci
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
- name: Recover npm caches
uses: actions/cache@v4
id: npm-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-node-
- name: Yarn install
run: yarn install --silent
- name: npm install
run: npm install

- name: Yarn build
run: yarn build
- name: npm build
run: npm run build

deployment:
name: Deployment
Expand All @@ -70,7 +74,7 @@ jobs:
steps:

- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up PHP 8.2
uses: shivammathur/setup-php@v2
Expand All @@ -85,11 +89,13 @@ jobs:
sudo chmod +x /usr/local/bin/dep;
dep self-update;
- name: Get Composer cache directory path
- name: Get Composer Cache Directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
run: |
echo "dir=$(composer config cache-files-dir)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v3
- name: Recover Composer caches
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -102,20 +108,25 @@ jobs:
- name: Build PHP
run: composer install --verbose --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}

- uses: actions/cache@v3
id: yarn-cache
- name: Recover npm caches
uses: actions/cache@v4
id: npm-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-node-
- name: npm install
run: npm install

- name: Build Frontend
run: yarn install --silent && yarn build
- name: npm build
run: npm run build

- name: Setup SSH Key
env:
Expand Down

0 comments on commit 34d6ba7

Please sign in to comment.