Skip to content

Commit

Permalink
Revert the migration from Vercel App to Vercel action (#973)
Browse files Browse the repository at this point in the history
* Revert "Disable pull_request_target for the vercel action (#969)"

This reverts commit f455c31.

* Revert "Use Vercel action for continuous documentation (#964)"

This reverts commit 17133d1.
  • Loading branch information
seisman authored Feb 26, 2021
1 parent 4db28ef commit 30728fd
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 103 deletions.
92 changes: 0 additions & 92 deletions .github/workflows/continuous-documentation.yml

This file was deleted.

19 changes: 8 additions & 11 deletions MAINTENANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ conda and the `Makefile` to run the tests and checks.

### GitHub Actions

There are 6 configuration files located in `.github/workflows`:
There are 5 configuration files located in `.github/workflows`:

1. `style_checks.yaml` (Code lint and style checks)

Expand Down Expand Up @@ -84,19 +84,16 @@ This workflow is ran to publish wheels to PyPI and TestPyPI (for testing only).
Archives will be pushed to TestPyPI on every commit to the *master* branch and
tagged releases, and to PyPI for tagged releases only.

6. `continuous-documentation.yml` (Deploy documentation to Vercel for preview)

This workflow builds and deploys the documentation in Pull Requests to Vercel,
to make it easier to preview documentation changes.

## Continuous Documentation

We use a cloud platform service called [Vercel](https://vercel.com/) via
[vercel-action](https://github.com/marketplace/actions/vercel-action) to
preview changes made to our documentation website every time we make a commit
in a pull request. The workflow `continuous-documentation.yml` builds and
deploys the documentation to Vercel. The vercel bot will automatically make a
comment with a URL to preview the deployed documentation for that pull request.
We use the [Vercel for GitHub](https://github.com/apps/vercel) App to preview changes
made to our documentation website every time we make a commit in a pull request.
The service has a configuration file `vercel.json`, with a list of options to
change the default behaviour at https://vercel.com/docs/configuration.
The actual script `package.json` is used by Vercel to install the necessary packages,
build the documentation, copy the files to a 'public' folder and deploy that to the web,
see https://vercel.com/docs/build-step.

## Making a Release

Expand Down
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"scripts": {
"build:miniconda": "curl -o ~/miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && bash ~/miniconda.sh -b -p $HOME/miniconda",
"build:pygmt": "conda install mamba -c conda-forge -y && mamba env create -f environment.yml && source activate pygmt && make install",
"build:docs": "source activate pygmt && cd doc && make all && mv _build/html ../public",
"build": "export PATH=$HOME/miniconda/bin:$PATH && npm run build:miniconda && npm run build:pygmt && npm run build:docs"
}
}
6 changes: 6 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"github": {
"silent": true
},
"public": true
}

0 comments on commit 30728fd

Please sign in to comment.