Uses existing tmp directory recommended by GitHub

This commit is contained in:
Daniel Vu
2023-10-01 16:43:57 -04:00
parent 511448d6c0
commit fb2403d2f9
3 changed files with 4 additions and 5 deletions
+2 -4
View File
@@ -36,7 +36,6 @@ jobs:
env:
NPM_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
CDN_SHEETS_FOLDER: ${{ vars.CDN_SHEETS_FOLDER }}
DEST_DIR: /tmp
steps:
- uses: actions/checkout@v3
- id: 'auth'
@@ -62,7 +61,7 @@ jobs:
command: install
args: fd-find
- run: make clean
- run: DEST_DIR=$RUNNER_TEMP bun run contrib/sheet-pixie/index.ts ${{ needs.changes.outputs.sheet-json }}
- run: bun run contrib/sheet-pixie/index.ts ${{ needs.changes.outputs.sheet-json }}
- run: bash update.sh
- run: bash sync_sheets.sh
@@ -74,7 +73,6 @@ jobs:
env:
NPM_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
CDN_SHEETS_FOLDER: ${{ vars.CDN_SHEETS_FOLDER }}
DEST_DIR: /tmp
steps:
- uses: actions/checkout@v3
- id: 'auth'
@@ -101,4 +99,4 @@ jobs:
args: fd-find
- run: make clean
- run: make all
- run: bash force-update.sh "$DEST_DIR"
- run: bash force-update.sh "$RUNNER_TEMP"
+1 -1
View File
@@ -41,7 +41,7 @@ async function onSheetChange(sheetDir: string) {
const cssRes = await tryCss(Bun.file(`${sheetDir}/${cssPath}`), advanced);
const { css, rawCss } = cssRes;
const distDir = `${process.env.DEST_DIR || ''}/${sheetDir}/dist`;
const distDir = `${process.env.RUNNER_TEMP || '/tmp'}/${sheetDir}/dist`;
rmSync(distDir, { recursive: true, force: true });
mkdirSync(distDir, { recursive: true });
await Promise.all([
+1
View File
@@ -1,4 +1,5 @@
function saveToFile(path: string, content: string) {
console.log("Writing content to file: " + path);
return Bun.write(path, content);
}
export { saveToFile };