Skip to content

Commit

Permalink
ci: update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
cedoor committed Feb 2, 2024
1 parent 2b5f18f commit 5961c62
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 38 deletions.
25 changes: 3 additions & 22 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,33 +33,14 @@ jobs:

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

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "16"
node-version: 20
cache: yarn

- name: Setup Pages
uses: actions/configure-pages@v3
with:
# Automatically inject basePath in your Next.js configuration file and disable
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
# You may remove this line if you want to manage the configuration yourself.
static_site_generator: next

- name: Restore cache
uses: actions/cache@v3
with:
path: |
apps/web-app/.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
- name: Install dependencies
run: yarn
- name: Build with Next.js
Expand Down
19 changes: 3 additions & 16 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,12 @@ jobs:

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

- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "16"

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"

- name: Restore yarn cache
uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version: 20

- name: Install dependencies
run: yarn
Expand Down

0 comments on commit 5961c62

Please sign in to comment.