Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 44 additions & 33 deletions src/content/docs/de/guides/deploy/deno.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Dein Astro-Projekt ist standardmäßig eine statische Website. Du brauchst keine
So aktivierst du SSR in deinem Astro-Projekt und stellst es mit Deno Deploy bereit:

<Steps>
1. Installiere [den `@deno/astro-adapter`-Adapter][Deno adapter] mit deinem bevorzugten Paketmanager als Abhängigkeit deines Projekts.
1. Installiere [den `@deno/astro-adapter`-Adapter][deno-adapter] mit deinem bevorzugten Paketmanager als Abhängigkeit deines Projekts.

<PackageManagerTabs>
<Fragment slot="npm">
Expand Down Expand Up @@ -68,10 +68,9 @@ So aktivierst du SSR in deinem Astro-Projekt und stellst es mit Deno Deploy bere

3. Aktualisiere dein `preview`-Skript in der Datei `package.json` mit der folgenden Änderung.

```json del={8} ins={9}
```json del={7} ins={8}
// package.json
{
// ...
"scripts": {
"dev": "astro dev",
"start": "astro dev",
Expand Down Expand Up @@ -127,7 +126,7 @@ Du kannst deine Astro-Website auf deinem eigenen Server betreiben oder auf Deno
</Fragment>
<Fragment slot="yarn">
```shell
yarn
yarn install
```
</Fragment>
</PackageManagerTabs>
Expand Down Expand Up @@ -203,11 +202,11 @@ Wenn dein Projekt auf GitHub gespeichert ist, führt dich die [Deno Deploy-Webse
- name: Clone repository
uses: actions/checkout@v6

# Du benutzt kein npm? Ändere `npm ci` in `yarn install` oder `pnpm i`
# Du benutzt kein npm? Ändere `npm ci` in `pnpm i` oder `yarn install`
- name: Install dependencies
run: npm ci

# Du benutzt kein npm? Ändere `npm run build` in `yarn build` oder `pnpm run build`
# Du benutzt kein npm? Ändere `npm run build` in `pnpm run build` oder `yarn run build`
- name: Build Astro
run: npm run build

Expand Down Expand Up @@ -240,11 +239,11 @@ Wenn dein Projekt auf GitHub gespeichert ist, führt dich die [Deno Deploy-Webse
- name: Clone repository
uses: actions/checkout@v6

# Du benutzt kein npm? Ändere `npm ci` in `yarn install` oder `pnpm i`
# Du benutzt kein npm? Ändere `npm ci` in `pnpm i` oder `yarn install`
- name: Install dependencies
run: npm ci

# Du benutzt kein npm? Ändere `npm run build` in `yarn build` oder `pnpm run build`
# Du benutzt kein npm? Ändere `npm run build` in `pnpm run build` oder `yarn run build`
- name: Build Astro
run: npm run build

Expand Down Expand Up @@ -309,46 +308,58 @@ Wenn dein Projekt auf GitHub gespeichert ist, führt dich die [Deno Deploy-Webse

Du kannst alle deine Veröffentlichungen auf [Deno Deploy](https://dash.deno.com) verfolgen.

4. (Optional) Um den Build und die Veröffentlichung in einem Befehl zu vereinfachen, füge ein `deploy-deno` Skript in die `package.json` ein.
4. (Optional) Um den Build und die Veröffentlichung in einem Befehl zu vereinfachen, füge ein `deploy-deno` Skript in die `package.json` ein und passe es an deinen bevorzugten Paketmanager an.

<StaticSsrTabs>
<Fragment slot="static">
```json ins={9}
```json ins={8}
// package.json
{
// ...
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
"deno-deploy": "npm run build && cd dist && deployctl deploy jsr:@std/http/file-server"
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
"deno-deploy": "npm run build && cd dist && deployctl deploy jsr:@std/http/file-server"
}
}
```
</Fragment>
<Fragment slot="ssr">
```json ins={9}
// package.json
{
// ...
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "deno run --allow-net --allow-read --allow-env ./dist/server/entry.mjs",
"deno-deploy": "npm run build && deployctl deploy ./dist/server/entry.mjs"
}
}
```
```json ins={8}
// package.json
{
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "deno run --allow-net --allow-read --allow-env ./dist/server/entry.mjs",
"deno-deploy": "npm run build && deployctl deploy ./dist/server/entry.mjs"
}
}
```
</Fragment>
</StaticSsrTabs>

Dann kannst du diesen Befehl verwenden, um deine Astro-Website in einem Schritt zu erstellen und veröffentlichen.

```bash
npm run deno-deploy
```
<PackageManagerTabs>
<Fragment slot="npm">
```shell
npm run deno-deploy
```
</Fragment>
<Fragment slot="pnpm">
```shell
pnpm run deno-deploy
```
</Fragment>
<Fragment slot="yarn">
```shell
yarn run deno-deploy
```
</Fragment>
</PackageManagerTabs>
</Steps>

[Deno adapter]: https://github.com/denoland/deno-astro-adapter
[deno-adapter]: https://github.com/denoland/deno-astro-adapter
Loading