mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-12 01:00:34 +08:00
Remove unsued file in CI cache & Bump CI deps
This commit is contained in:
parent
d5c13b06bd
commit
8741c44115
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
@ -141,10 +141,10 @@ jobs:
|
||||
name: Deploy to Cloudflare Pages
|
||||
if: github.ref == 'refs/heads/master'
|
||||
runs-on: ubuntu-24.04-arm
|
||||
# matrix is a tricky way to define a variable directly in the jon yaml
|
||||
# matrix is a tricky way to define a variable directly in the action yaml
|
||||
strategy:
|
||||
matrix:
|
||||
wranglerVersion: ['3.114.6']
|
||||
wranglerVersion: ['3.114.9']
|
||||
steps:
|
||||
- name: Get NPM cache directory path
|
||||
id: npm_cache_path
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import process from 'node:process';
|
||||
import os from 'node:os';
|
||||
import fs from 'node:fs';
|
||||
import fsp from 'node:fs/promises';
|
||||
|
||||
import { downloadPreviousBuild } from './download-previous-build';
|
||||
import { buildCommon } from './build-common';
|
||||
@ -28,7 +29,7 @@ import { buildCloudMounterRules } from './build-cloudmounter-rules';
|
||||
import { createSpan, printTraceResult, whyIsNodeRunning } from './trace';
|
||||
import { buildDeprecateFiles } from './build-deprecate-files';
|
||||
import path from 'node:path';
|
||||
import { ROOT_DIR } from './constants/dir';
|
||||
import { CACHE_DIR, ROOT_DIR } from './constants/dir';
|
||||
import { isCI } from 'ci-info';
|
||||
|
||||
process.on('uncaughtException', (error) => {
|
||||
@ -40,6 +41,12 @@ process.on('unhandledRejection', (reason) => {
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
const removesFiles = [
|
||||
path.join(CACHE_DIR, '.cache.db'),
|
||||
path.join(CACHE_DIR, '.cache.db-shm'),
|
||||
path.join(CACHE_DIR, '.cache.db-wal')
|
||||
];
|
||||
|
||||
const buildFinishedLock = path.join(ROOT_DIR, '.BUILD_FINISHED');
|
||||
|
||||
(async () => {
|
||||
@ -82,6 +89,7 @@ const buildFinishedLock = path.join(ROOT_DIR, '.BUILD_FINISHED');
|
||||
const buildCommonPromise = downloadPreviousBuildPromise.then(() => buildCommon(rootSpan));
|
||||
|
||||
await Promise.all([
|
||||
...removesFiles.map(file => fsp.rm(file, { force: true })),
|
||||
downloadPreviousBuildPromise,
|
||||
buildCommonPromise,
|
||||
downloadPreviousBuildPromise.then(() => buildRejectIPList(rootSpan)),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user