Skip to content

Commit 62c6670

Browse files
maxrjoneswildintellect
authored andcommitted
Publish previews using netlify (#166)
* Publish previews using netlify * Remove GH preview workflow * Remove staging explanation from contrib guide * Remove pr-target-test job * Add build with Netlify badge for open source program
1 parent 2f40132 commit 62c6670

File tree

6 files changed

+14
-54
lines changed

6 files changed

+14
-54
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,7 @@ on:
88
pull_request:
99

1010
jobs:
11-
pr-target-test:
12-
runs-on: ubuntu-latest
13-
steps:
14-
- name: Fail if target is not staging (for PRs only)
15-
if: github.event_name == 'pull_request'
16-
run: |
17-
if [[ "${{ github.event.pull_request.base.ref }}" != "main" || "${{ github.event.pull_request.head.ref }}" == "staging" ]]; then
18-
echo "Target branch is acceptable."
19-
else
20-
echo "Only PRs from staging can target main."
21-
exit 1
22-
fi
11+
2312

2413
tests:
2514
runs-on: ubuntu-latest

.github/workflows/preview.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

contributing.qmd

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,6 @@ We encourage contributions to this guide. The guide's goal is to provide documen
1010

1111
If you wish to preview the site locally, install [quarto](https://quarto.org/). You will also need to be familiar with [quarto markdown](https://quarto.org/docs/authoring/markdown-basics.html).
1212

13-
## Contribution Workflow
14-
15-
Due to previews only working from branches within the repository and not external forks (see: [#74](https://github.com/cloudnativegeo/cloud-optimized-geospatial-formats-guide/issues/74)), all PRs should target staging. More specifically, the contribution workflow follows these steps:
16-
17-
1. PR is made with `staging` as target.
18-
19-
2. Maintainer will merge the PR to staging and then open a PR to main (build preview will run).
20-
21-
3. Maintainers merge to main which triggers the production deployment.
22-
23-
The process is not ideal, and we are open to suggestions on how to improve upon it. The main constraint is the [`pr-preview-action`](https://github.com/rossjrw/pr-preview-action) not supporting previews on external contributions.
24-
2513
## Communication Channels
2614

2715
Discussions can occur in [GitHub Discussions](https://github.com/cloudnativegeo/cloud-optimized-geospatial-formats-guide/discussions) and issues can be raised at [GitHub Issues](https://github.com/cloudnativegeo/cloud-optimized-geospatial-formats-guide/issues).

index.qmd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,9 @@ Most of the data formats covered in this guide have a Jupyter Notebook example t
9797
5. How much of your data is typically rendered or selected at once?
9898

9999
{{< include _thankyous.qmd >}}
100+
101+
```{=html}
102+
<a href="https://www.netlify.com">
103+
<img src="https://www.netlify.com/assets/badges/netlify-badge-color-accent.svg" alt="Deploys by Netlify" />
104+
</a>
105+
```

netlify.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[[plugins]]
2+
package = "@quarto/netlify-plugin-quarto"

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"dependencies": {
3+
"@quarto/netlify-plugin-quarto": "^0.0.5"
4+
}
5+
}

0 commit comments

Comments
 (0)