diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..e82eb7b --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,25 @@ +on: + workflow_dispatch: + push: + branches: main + +name: Quarto Publish + +jobs: + build-deploy: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Quarto + uses: quarto-dev/quarto-actions/setup@v2 + + - name: Render and Publish + uses: quarto-dev/quarto-actions/publish@v2 + with: + target: gh-pages + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/_quarto.yml b/_quarto.yml index e99f99e..d7bf160 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -70,3 +70,5 @@ filters: - include-files.lua - quarto +execute: + freeze: auto diff --git a/how-to-publish.md b/how-to-publish.md new file mode 100644 index 0000000..44b880c --- /dev/null +++ b/how-to-publish.md @@ -0,0 +1,31 @@ +# How to Publish Cookbook on GH Pages + +I am following these [instructions](https://quarto.org/docs/publishing/github-pages.html#github-action) provided by Quarto. + +## 1. Freeze Computations + +I am only allowing code to be executed locally. + +In `_quarto.yml`, I have added the following +``` +execute: + freeze: auto +``` + +Now render the site +``` +quarto render +``` + +If a `_freeze` directory is created, add and commit this. + +## 2. Publish Action + +Run + +``` +quarto publish gh-pages +``` + +Add `.github/workflows/publish.yml` and add text from quarto [instructions](https://quarto.org/docs/publishing/github-pages.html#publish-action) + diff --git a/reference-guides/overview.qmd b/reference-guides/overview.qmd index 05a1420..000c57e 100644 --- a/reference-guides/overview.qmd +++ b/reference-guides/overview.qmd @@ -8,7 +8,7 @@ author: Andy P. Barrett This section of the cookbook contains **Reference Guides** to a variety of topics. Reference Guides are intended to provide background information for the [**How-To -Guides**](nsidc-data-cookbook/how-tos/overview.qmd) and [**Tutorials**](nsidc-data-cookbook/tutorials/index.qmd). +Guides**](../how-to-guides/overview.qmd). Reference Guides are organized into the following sections: _Maybe add a short description of each section here_