Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 6 additions & 18 deletions .github/workflows/continuous-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ on:
- '.github/workflows/continuous-documentation.yml'

jobs:
vercel:
name: Deploy to Vercel
docs:
name: Build documentation
runs-on: ubuntu-latest
defaults:
run:
Expand Down Expand Up @@ -73,20 +73,8 @@ jobs:
- name: Build the documentation
run: make -C doc clean all

- name: Deploy documentation to Vercel
uses: amondnet/[email protected]
- name: Upload documentation as artifacts
uses: actions/upload-artifact@v2
with:
# Generate a vercel token at https://vercel.com/account/tokens,
# and save the value in the secrets setting in the repository.
vercel-token: ${{ secrets.VERCEL_TOKEN }}
# https://github.com/marketplace/actions/vercel-action#project-linking
# Install the Vercel CLI and run `vercel` in the project directory.
# After linking the repository with a Vercel project, `vercel` will
# create a `.vercel` directory containing both the organization (vercel-org-id)
# and project (vercel-project-id) id of the project.
# Save the values in the secrets setting in the repository.
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
github-token: ${{ secrets.GITHUB_TOKEN }}
github-comment: true
working-directory: ./doc/_build/html
name: docs
path: doc/_build/html
57 changes: 57 additions & 0 deletions .github/workflows/vercel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Vercel

# read-write repo token
# access to secrets
on:
workflow_run:
workflows: ["Continuous Documentation"]
types:
- completed

jobs:
vercel:
name: Deploy documentation to Vercel
runs-on: ubuntu-latest
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'

steps:
- name: 'Download artifact'
uses: actions/[email protected]
with:
script: |
var artifacts = await github.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "docs"
})[0];
var download = await github.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/docs.zip', Buffer.from(download.data));

- run: unzip docs.zip

- name: Deploy documentation to Vercel
uses: amondnet/[email protected]
with:
# Generate a vercel token at https://vercel.com/account/tokens,
# and save the value in the secrets setting in the repository.
vercel-token: ${{ secrets.VERCEL_TOKEN }}
# https://github.com/marketplace/actions/vercel-action#project-linking
# Install the Vercel CLI and run `vercel` in the project directory.
# After linking the repository with a Vercel project, `vercel` will
# create a `.vercel` directory containing both the organization (vercel-org-id)
# and project (vercel-project-id) id of the project.
# Save the values in the secrets setting in the repository.
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
github-token: ${{ secrets.GITHUB_TOKEN }}
github-comment: true
working-directory: ./doc/_build/html
5 changes: 4 additions & 1 deletion doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Installing
<https://forum.generic-mapping-tools.org/c/questions/pygmt-q-a>`__.


TEST


Quickstart
----------

Expand Down Expand Up @@ -147,7 +150,7 @@ Alternatively, you can install the latest development version from

pip install --pre --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pygmt

or from PyGMT's `GitHub repository <https://github.com/GenericMappingTools/pygmt>`__
or from PyGMT's `GitHub repository <https://github.com/GenericMappingTools/pygmt>`__
(slower as it downloads the whole archive)::

pip install git+https://github.com/GenericMappingTools/pygmt.git#egg=pygmt
Expand Down