Skip to content
Open
Show file tree
Hide file tree
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
35 changes: 35 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: 🔂 Surge PR Preview

on:
workflow_dispatch:
pull_request:
branches: [main]

jobs:
preview:
runs-on: ubuntu-latest
permissions:
pull-requests: write # allow surge-preview to create/update PR comments
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2

- name: Render Quarto Project
uses: quarto-dev/quarto-actions/render@v2
with:
to: html
path: public

- uses: afc163/surge-preview@v1
id: preview_step
with:
surge_token: ${{ secrets.SURGE_TOKEN }}
dist: public

- name: Get the preview_url
run: echo "url => ${{ steps.preview_step.outputs.preview_url }}"
2 changes: 0 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]

name: Quarto Publish

Expand Down