Skip to content

Commit

Permalink
feat: add guide on deploying to deno deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
lino-levan committed Mar 12, 2023
1 parent 4df5491 commit 08d8802
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/lib/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type { Config } from "./types.ts";

import "https://esm.sh/[email protected]/components/prism-json?no-check";
import "https://esm.sh/[email protected]/components/prism-bash?no-check";
import "https://esm.sh/[email protected]/components/prism-yaml?no-check";

export function render(config: Config, path: string) {
const markdown = resolve_file(resolve("pages", path));
Expand Down
48 changes: 48 additions & 0 deletions www/pages/guides/deployment/deno-deploy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: Deno Deploy
description: Pyro was designed from the ground up to be no-config and incredibly fast.
index: 0
---

Pyro provides an easy way to publish to Deno Deploy using Github Actions, which
comes for free with every GitHub repository.

Place the following file in `.github/workflows/deploy.yml` and replace
`DENO_DEPLOY_PROJECT` with the name of your project on Deno Deploy.

```yaml
name: Deploy

on: [push, pull_request]

jobs:
deploy:
runs-on: ubuntu-latest

permissions:
id-token: write # This is required to allow the GitHub Action to authenticate with Deno Deploy.
contents: read

steps:
- name: Clone repository
uses: actions/checkout@v3

- name: Download Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- name: Install Pyro
run: deno install -Af --reload --config https://deno.land/x/pyro/deno.jsonc -n pyro https://deno.land/x/pyro/cli.ts

- name: Build the website
working-directory: ./www
run: pyro build

- name: Deploy to Deno Deploy
uses: denoland/deployctl@v1
with:
project: DENO_DEPLOY_PROJECT
entrypoint: https://deno.land/std/http/file_server.ts
root: ./www/build
```
8 changes: 0 additions & 8 deletions www/pages/guides/deployment/github-pages.md

This file was deleted.

0 comments on commit 08d8802

Please sign in to comment.