-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from nhs-r-community/revert-74-gh-action
Revert "Replaced with nix code from https://www.brodrigues.co/blog/2023-10-20…"
- Loading branch information
Showing
1 changed file
with
33 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |