Using Cache and Telemetry Opt-Out
Some checks failed
Build and Deploy Next.js Site / deploy (push) Failing after 2m44s
Some checks failed
Build and Deploy Next.js Site / deploy (push) Failing after 2m44s
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
name: Build and Deploy Astro Site
|
name: Build and Deploy Next.js Site
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -12,11 +12,31 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node.js and cache
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '18'
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
|
- name: Cache Next.js build
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.npm
|
||||||
|
${{ github.workspace }}/.next/cache
|
||||||
|
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
|
||||||
|
|
||||||
|
- name: Disable Next.js telemetry
|
||||||
|
run: npx next telemetry disable
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
- name: Build and deploy
|
- name: Build and deploy
|
||||||
run: |
|
run: |
|
||||||
npm install
|
|
||||||
mv src/app/\(cms\) src/app/_cms
|
mv src/app/\(cms\) src/app/_cms
|
||||||
npm run build
|
npm run build
|
||||||
# Deploy
|
|
||||||
rm -rf /var/www/sites/dave-dmg/blog/*
|
rm -rf /var/www/sites/dave-dmg/blog/*
|
||||||
cp -r out/* /var/www/sites/dave-dmg/blog/
|
cp -r out/* /var/www/sites/dave-dmg/blog/
|
||||||
Reference in New Issue
Block a user