Skip to content

Commit 1fe12e0

Browse files
authored
Merge pull request #9 from nsidc/publish-site
Publish site
2 parents 84fd39b + cb9b23f commit 1fe12e0

File tree

4 files changed

+59
-1
lines changed

4 files changed

+59
-1
lines changed

.github/workflows/publish.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
on:
2+
workflow_dispatch:
3+
push:
4+
branches: main
5+
6+
name: Quarto Publish
7+
8+
jobs:
9+
build-deploy:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- name: Check out repository
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Quarto
18+
uses: quarto-dev/quarto-actions/setup@v2
19+
20+
- name: Render and Publish
21+
uses: quarto-dev/quarto-actions/publish@v2
22+
with:
23+
target: gh-pages
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

_quarto.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,5 @@ filters:
7070
- include-files.lua
7171
- quarto
7272

73+
execute:
74+
freeze: auto

how-to-publish.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# How to Publish Cookbook on GH Pages
2+
3+
I am following these [instructions](https://quarto.org/docs/publishing/github-pages.html#github-action) provided by Quarto.
4+
5+
## 1. Freeze Computations
6+
7+
I am only allowing code to be executed locally.
8+
9+
In `_quarto.yml`, I have added the following
10+
```
11+
execute:
12+
freeze: auto
13+
```
14+
15+
Now render the site
16+
```
17+
quarto render
18+
```
19+
20+
If a `_freeze` directory is created, add and commit this.
21+
22+
## 2. Publish Action
23+
24+
Run
25+
26+
```
27+
quarto publish gh-pages
28+
```
29+
30+
Add `.github/workflows/publish.yml` and add text from quarto [instructions](https://quarto.org/docs/publishing/github-pages.html#publish-action)
31+

reference-guides/overview.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author: Andy P. Barrett
88
This section of the cookbook contains **Reference Guides** to a
99
variety of topics. Reference Guides are intended to provide
1010
background information for the [**How-To
11-
Guides**](nsidc-data-cookbook/how-tos/overview.qmd) and [**Tutorials**](nsidc-data-cookbook/tutorials/index.qmd).
11+
Guides**](../how-to-guides/overview.qmd).
1212

1313
Reference Guides are organized into the following sections:
1414
_Maybe add a short description of each section here_

0 commit comments

Comments
 (0)