Skip to content

Commit

Permalink
docs: guide on publishing to github pages (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
lino-levan authored Mar 17, 2023
1 parent eaf88ae commit 4464c6a
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 3 deletions.
9 changes: 6 additions & 3 deletions www/pages/guides/deployment/deno-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ Place the following file in `.github/workflows/deploy.yml` and replace
```yaml
name: Deploy

on: [push, pull_request]
on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
deploy:
Expand All @@ -36,13 +40,12 @@ jobs:
run: deno run -Ar https://deno.land/x/pyro/install.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
root: ./build
```
59 changes: 59 additions & 0 deletions www/pages/guides/deployment/github-pages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
title: Github Pages
description: Pyro was designed from the ground up to be no-config and incredibly fast.
index: 1
---

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

Place the following file in `.github/workflows/deploy.yml`.

```yaml
name: Deploy

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
deploy:
runs-on: ubuntu-latest

permissions:
id-token: write
pages: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Checkout
uses: actions/checkout@v3

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

- name: Install Pyro
run: deno run -Ar https://deno.land/x/pyro/install.ts

- name: Build the website
run: pyro build

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: './build'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
```

0 comments on commit 4464c6a

Please sign in to comment.