diff --git a/.github/workflows/publish-and-deploy.yaml b/.github/workflows/publish-and-deploy.yaml index cd3be16..1a407b4 100644 --- a/.github/workflows/publish-and-deploy.yaml +++ b/.github/workflows/publish-and-deploy.yaml @@ -39,6 +39,13 @@ jobs: with: name: dist-files path: dist/ + + - name: Upload function artifacts + uses: actions/upload-artifact@v4 + with: + name: function-files + path: functions/ + deploy: needs: publish runs-on: ubuntu-latest @@ -52,9 +59,18 @@ jobs: name: dist-files path: dist/ + - name: Download function artifacts + uses: actions/download-artifact@v4 + with: + name: function-files + path: functions/ + - name: "List publish directory contents" run: ls -R dist + - name: "List functions directory contents" + run: ls -R functions + - name: Deploy to Cloudflare pages uses: cloudflare/wrangler-action@v3 with: diff --git a/README.md b/README.md index 762bb3a..82bec43 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ cd ArmoryNodeWebsite 2. Build and run the project ```bash # Use this command to build and run the project -wrangler pages dev +deno task run # Use this command if you only wish to generate the javascript and css # (e.g. using your own web server) diff --git a/publish.ts b/publish.ts index 9150d0b..bc4941e 100644 --- a/publish.ts +++ b/publish.ts @@ -9,7 +9,6 @@ async function publish() { console.log("šŸš€ Publishing files to `dist/`..."); await Deno.mkdir("./dist", { recursive: true }); await fs.copy("./static", "./dist/static", { overwrite: true }); - await fs.copy("./functions", "./dist/functions", { overwrite: true }); await fs.copy("./wrangler.toml", "./dist/wrangler.toml", { overwrite: true }); // Move _headers to the root of dist diff --git a/run.ts b/run.ts index 7a39196..814fa92 100644 --- a/run.ts +++ b/run.ts @@ -6,7 +6,7 @@ async function runTasks() { await compile(); // Run wrangler - console.log("\n🤠 Running Wrangler..."); + console.log("🤠 Running Wrangler..."); const wranglerStep = new Deno.Command("npx", { args: ["wrangler", "pages", "dev"], stdout: "inherit", diff --git a/wrangler.toml b/wrangler.toml index efe91d6..66a1f0e 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -1,6 +1,6 @@ name = "armorynode" pages_build_output_dir = "static" -compatibility_date = "2023-11-15" +compatibility_date = "2024-11-11" [vars] NODE_VERSION = "22.13.1"