Skip to content

Commit bd784cc

Browse files
committed
upgrade to Worker v4
1 parent e8d905e commit bd784cc

File tree

9 files changed

+18998
-36
lines changed

9 files changed

+18998
-36
lines changed

.github/workflows/deploy.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ on:
2020

2121
jobs:
2222
deploy:
23-
runs-on: ubuntu-22.04
23+
runs-on: ubuntu-latest
2424
steps:
2525
- name: Checkout
2626
uses: actions/checkout@v4
@@ -29,17 +29,18 @@ jobs:
2929
run: bun install
3030

3131
- name: Build
32-
run: bunx nuxi build --preset=cloudflare_pages
32+
run: bunx nuxi build
3333

3434
- name: Deploy
3535
uses: cloudflare/wrangler-action@v3
3636
# env:
3737
# YOUR_SECRET: ${{ secrets.YOUR_SECRET }}
3838
# YOUR_OTHER_SECRET: ${{ secrets.YOUR_OTHER_SECRET }}
3939
with:
40+
wranglerVersion: "4.19.1"
4041
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
4142
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
42-
command: pages deploy ./dist --project-name roadmap
43+
command: deploy
4344
# secrets: |
4445
# YOUR_SECRET
4546
# YOUR_OTHER_SECRET

components/sidebar/ReadStatus.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
<script setup>
3030
import { ref } from "vue";
31-
import Dropdown from "v-dropdown";
31+
import { Dropdown } from "v-dropdown";
3232
3333
const { $locally } = useNuxtApp();
3434
const allStatus = ["Pendiente", "Leyendo", "Completado", "Omitir"];

flake.lock

Lines changed: 81 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,52 @@
33
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
44
fenix.url = "github:nix-community/fenix";
55
flake-utils.url = "github:numtide/flake-utils";
6+
workerd = {
7+
url = "github:getchoo/workerd-docker";
8+
inputs.nixpkgs.follows = "nixpkgs";
9+
};
10+
wrangler = {
11+
# Use 4.19.1
12+
url = "github:ryand56/wrangler/1141a859c59e05ceb901d14790f0f75a6c5de3f5";
13+
inputs.nixpkgs.follows = "nixpkgs";
14+
};
615
};
716

817
outputs = {
9-
self,
1018
nixpkgs,
1119
flake-utils,
1220
...
1321
} @ inputs:
1422
flake-utils.lib.eachSystem (flake-utils.lib.defaultSystems) (
1523
system: let
16-
pkgs = nixpkgs.legacyPackages.${system};
17-
fenix = inputs.fenix.packages;
24+
pkgs = import nixpkgs { inherit system; };
25+
fenix = inputs.fenix.packages.${system};
26+
workerd = inputs.workerd.packages.${system}.workerd;
27+
wrangler = inputs.wrangler.packages.${system}.wrangler;
28+
1829
# fenix: rustup replacement for reproducible builds
19-
toolchain = fenix.${system}.fromToolchainFile {
30+
toolchain = fenix.fromToolchainFile {
2031
file = ./rust-toolchain.toml;
21-
sha256 = "sha256-Ngiz76YP4HTY75GGdH2P+APE/DEIx2R/Dn+BwwOyzZU=";
32+
sha256 = "sha256-KUm16pHj+cRedf8vxs/Hd2YWxpOrWZ7UOrwhILdSJBU=";
2233
};
2334
in {
2435
# `nix develop`
2536
devShells.default = pkgs.mkShell {
2637
packages = with pkgs; [
27-
toolchain
2838
pkg-config
29-
cargo-dist
3039
git-cliff
40+
wrangler
41+
42+
# Rust
43+
toolchain
44+
cargo-dist
45+
46+
# NodeJs
47+
nodejs_22
48+
bun
3149
];
50+
51+
MINIFLARE_WORKERD_PATH = "${workerd}/bin/workerd";
3252
};
3353
}
3454
);

nuxt.config.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const generateContentRoutes = require('./generateContentRoutes');
33
// https://nuxt.com/docs/api/configuration/nuxt-config
44
export default defineNuxtConfig({
55
devtools: { enabled: true },
6-
modules: ["@nuxt/content", "@nuxtjs/tailwindcss", "@nuxtjs/seo"],
6+
modules: ["nitro-cloudflare-dev", "@nuxt/content", "@nuxtjs/tailwindcss", "@nuxtjs/seo"],
77
site: {
88
url: 'https://roadmap.rustlang-es.org',
99
name: 'Hoja de Ruta Definitiva para Aprender Rust',
@@ -12,6 +12,11 @@ export default defineNuxtConfig({
1212
},
1313
ogImage: { enabled: false },
1414
nitro: {
15+
preset: "cloudflare_module",
16+
cloudflare: {
17+
deployConfig: true,
18+
nodeCompat: true
19+
},
1520
prerender: {
1621
routes: ['/sitemap.xml'],
1722
}

0 commit comments

Comments
 (0)