Skip to content

Commit

Permalink
Merge pull request #75 from nhs-r-community/revert-74-gh-action
Browse files Browse the repository at this point in the history
Revert "Replaced with nix code from https://www.brodrigues.co/blog/2023-10-20…"
  • Loading branch information
Lextuga007 authored Nov 29, 2023
2 parents 09ab487 + f4ad903 commit 973e235
Showing 1 changed file with 33 additions and 27 deletions.
60 changes: 33 additions & 27 deletions .github/workflows/quarto-publish.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,39 @@
name: Build book using Nix

on:
workflow_dispatch:
push:
branches:
- main
branches: main

name: Quarto Publish

# you need these permissions to publish to GitHub pages
permissions:
contents: write
pages: write

jobs:
build:
build-deploy:
runs-on: ubuntu-latest

permissions:
contents: write
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
with:
logger: pretty
log-directives: nix_installer=trace
backtrace: full

- name: Nix cache
uses: DeterminateSystems/magic-nix-cache-action@main

- name: Build development environment
run: |
nix-build
- name: Publish to GitHub Pages (and render)
uses: b-rodrigues/quarto-nix-actions/publish@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check out repository
uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-renv@v2

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

- name: Render Quarto Project
uses: quarto-dev/quarto-actions/render@v2

- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 973e235

Please sign in to comment.