home / content / repos

repos: 253632948

This data as json

id node_id name full_name private owner html_url description fork created_at updated_at pushed_at homepage size stargazers_count watchers_count language has_issues has_projects has_downloads has_wiki has_pages forks_count archived disabled open_issues_count license topics forks open_issues watchers default_branch permissions temp_clone_token organization network_count subscribers_count readme readme_html allow_forking visibility is_template template_repository web_commit_signoff_required has_discussions
253632948 MDEwOlJlcG9zaXRvcnkyNTM2MzI5NDg= datasette-publish-vercel simonw/datasette-publish-vercel 0 9599 https://github.com/simonw/datasette-publish-vercel Datasette plugin for publishing data using Vercel 0 2020-04-06T22:47:13Z 2022-07-29T17:09:47Z 2022-08-24T17:43:41Z   55 27 27 Python 1 1 1 1 0 5 0 0 17 apache-2.0 ["datasette", "datasette-io", "datasette-plugin", "vercel", "zeit-now"] 5 17 27 main {"admin": false, "maintain": false, "push": false, "triage": false, "pull": false}     5 4 # datasette-publish-vercel [![PyPI](https://img.shields.io/pypi/v/datasette-publish-vercel.svg)](https://pypi.org/project/datasette-publish-vercel/) [![Changelog](https://img.shields.io/github/v/release/simonw/datasette-publish-vercel?include_prereleases&label=changelog)](https://github.com/simonw/datasette-publish-vercel/releases) [![Tests](https://github.com/simonw/datasette-publish-vercel/workflows/Test/badge.svg)](https://github.com/simonw/datasette-publish-vercel/actions?query=workflow%3ATest) [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/datasette-publish-vercel/blob/main/LICENSE) Datasette plugin for publishing data using [Vercel](https://vercel.com/). ## Installation Install this plugin in the same environment as Datasette. $ datasette install datasette-publish-vercel ## Usage First, install the Vercel CLI tool by [following their instructions](https://vercel.com/download). Run `vercel login` to login to (or create) an account. Now you can use `datasette publish vercel` to publish your data: datasette publish vercel my-database.db --project=my-database The `--project` argument is required - it specifies the project name that should be used for your deployment. This will be used as part of the deployment's URL. ### Other options * `--no-prod` deploys to the project without updating the "production" URL alias to point to that new deployment. Without that option all deploys go directly to production. * `--debug` enables the Vercel CLI debug output. * `--token` allows you to pass a Now authentication token, rather than needing to first run `now login` to configure the tool. Tokens can be created in the Vercel web dashboard under Account Settings -> Tokens. * `--public` runs `vercel --public` to publish the application source code at `/_src` e.g. https://datasette-public.now.sh/_src and make recent logs visible at `/_logs` e.g. https://datasette-public.now.sh/_logs * `--generate-dir` - by default this tool generates a new Vercel app in a temporary directory, deploys it and then deletes the directory. Use `--generate-dir=my-app` to output the generated application files to a new directory of your choice instead. You can then deploy it by running `vercel` in that directory. * `--setting default_page_size 10` - use this to set Datasette settings, as described in [the documentation](https://docs.datasette.io/en/stable/settings.html). This is a replacement for the unsupported `--extra-options` option. ### Full help **Warning:** Some of these options are not yet implemented by this plugin. In particular, the following do not yet work: * `--extra-options` - use `--setting` described above instead. * `--plugin-secret` * `--version-note` ``` $ datasette publish vercel --help Usage: datasette publish vercel [OPTIONS] [FILES]... Publish to https://vercel.com/ Options: -m, --metadata FILENAME Path to JSON/YAML file containing metadata to publish --extra-options TEXT Extra options to pass to datasette serve --branch TEXT Install datasette from a GitHub branch e.g. main --template-dir DIRECTORY Path to directory containing custom templates --plugins-dir DIRECTORY Path to directory containing custom plugins --static MOUNT:DIRECTORY Serve static files from this directory at /MOUNT/... --install TEXT Additional packages (e.g. plugins) to install --plugin-secret <TEXT TEXT TEXT>... Secrets to pass to plugins, e.g. --plugin-secret datasette-auth-github client_id xxx --version-note TEXT Additional note to show on /-/versions --secret TEXT Secret used for signing secure values, such as signed cookies --title TEXT Title for metadata --license TEXT License label for metadata --license_url TEXT License URL for metadata --source TEXT Source label for metadata --source_url TEXT Source URL for metadata --about TEXT About label for metadata --about_url TEXT About URL for metadata --token TEXT Auth token to use for deploy --project PROJECT Vercel project name to use [required] --scope TEXT Optional Vercel scope (e.g. a team name) --no-prod Don't deploy directly to production --debug Enable Vercel CLI debug output --public Publish source with Vercel CLI --public --generate-dir DIRECTORY Output generated application files and stop without deploying --generate-vercel-json Output generated vercel.json file and stop without deploying --vercel-json FILENAME Custom vercel.json file to use instead of generating one --setting SETTING... Setting, see docs.datasette.io/en/stable/settings.html --crossdb Enable cross-database SQL queries --help Show this message and exit. ``` ## Using a custom `vercel.json` file If you want to add additional redirects or similar to your Vercel configuration you may want to provide a custom `vercel.json` file. To do this, first generate a configuration file (without running a deploy) using the `--generate-vercel-json` option: datasette publish vercel my-database.db \ --project=my-database \ --generate-vercel-json > vercel.json You can now edit the `vercel.json` file that this creates to add your custom options. Then run the deploy using: datasette publish vercel my-database.db \ --project=my-database \ --vercel-json=vercel.json ## Setting a `DATASETTE_SECRET` Datasette uses [a secret string](https://docs.datasette.io/en/stable/settings.html#configuring-the-secret) for purposes such as signing authentication cookies. This secret is reset when the server restarts, which will sign out any users who are authenticated using a signed cookie. You can avoid this by generating a `DATASETTE_SECRET` secret string and setting that as a [Vercel environment variable](https://vercel.com/docs/concepts/projects/environment-variables). If you do this the secret will stay consistent and your users will not be signed out. ## Using this with GitHub Actions This plugin can be used together with [GitHub Actions](https://github.com/features/actions) to deploy Datasette instances automatically on new pushes to a repo, or on a schedule. The GitHub Actions runners already have the Vercel deployment tool installed. You'll need to create an API token for your account at [vercel.com/account/tokens](https://vercel.com/account/tokens), and store that as a secret in your GitHub repository called `VERCEL_TOKEN`. Make sure your workflow has installed `datasette` and `datasette-publish-vercel` using `pip`, then add the following step to your GitHub Actions workflow: ``` - name: Deploy Datasette using Vercel env: VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} run: |- datasette publish vercel mydb.db \ --token $VERCEL_TOKEN \ --project my-vercel-project ``` You can see a full example of a workflow that uses Vercel in this way [in the simonw/til repository](https://github.com/simonw/til/blob/12b3f0d3679320cbeafa5df164bbc08ba703625d/.github/workflows/build.yml). <div id="readme" class="md" data-path="README.md"><article class="markdown-body entry-content container-lg" itemprop="text"><h1 dir="auto"><a id="user-content-datasette-publish-vercel" class="anchor" aria-hidden="true" href="#user-content-datasette-publish-vercel"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a>datasette-publish-vercel</h1> <p dir="auto"><a href="https://pypi.org/project/datasette-publish-vercel/" rel="nofollow"><img src="https://camo.githubusercontent.com/54812f865fef02d66cf1d1155ea07750ad19a0a88dad2d4f1a86f4fbd3fba8a0/68747470733a2f2f696d672e736869656c64732e696f2f707970692f762f6461746173657474652d7075626c6973682d76657263656c2e737667" alt="PyPI" data-canonical-src="https://img.shields.io/pypi/v/datasette-publish-vercel.svg" style="max-width: 100%;"></a> <a href="https://github.com/simonw/datasette-publish-vercel/releases"><img src="https://camo.githubusercontent.com/5ba538bc3912064a11f09b105ecd92083d1223f2f8a38034d17734d09a26f321/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f73696d6f6e772f6461746173657474652d7075626c6973682d76657263656c3f696e636c7564655f70726572656c6561736573266c6162656c3d6368616e67656c6f67" alt="Changelog" data-canonical-src="https://img.shields.io/github/v/release/simonw/datasette-publish-vercel?include_prereleases&amp;label=changelog" style="max-width: 100%;"></a> <a href="https://github.com/simonw/datasette-publish-vercel/actions?query=workflow%3ATest"><img src="https://github.com/simonw/datasette-publish-vercel/workflows/Test/badge.svg" alt="Tests" style="max-width: 100%;"></a> <a href="https://github.com/simonw/datasette-publish-vercel/blob/main/LICENSE"><img src="https://camo.githubusercontent.com/1698104e976c681143eb0841f9675c6f802bb7aa832afc0c7a4e719b1f3cf955/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d417061636865253230322e302d626c75652e737667" alt="License" data-canonical-src="https://img.shields.io/badge/license-Apache%202.0-blue.svg" style="max-width: 100%;"></a></p> <p dir="auto">Datasette plugin for publishing data using <a href="https://vercel.com/" rel="nofollow">Vercel</a>.</p> <h2 dir="auto"><a id="user-content-installation" class="anchor" aria-hidden="true" href="#user-content-installation"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a>Installation</h2> <p dir="auto">Install this plugin in the same environment as Datasette.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ datasette install datasette-publish-vercel"><pre class="notranslate"><code>$ datasette install datasette-publish-vercel </code></pre></div> <h2 dir="auto"><a id="user-content-usage" class="anchor" aria-hidden="true" href="#user-content-usage"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a>Usage</h2> <p dir="auto">First, install the Vercel CLI tool by <a href="https://vercel.com/download" rel="nofollow">following their instructions</a>.</p> <p dir="auto">Run <code>vercel login</code> to login to (or create) an account.</p> <p dir="auto">Now you can use <code>datasette publish vercel</code> to publish your data:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="datasette publish vercel my-database.db --project=my-database"><pre class="notranslate"><code>datasette publish vercel my-database.db --project=my-database </code></pre></div> <p dir="auto">The <code>--project</code> argument is required - it specifies the project name that should be used for your deployment. This will be used as part of the deployment's URL.</p> <h3 dir="auto"><a id="user-content-other-options" class="anchor" aria-hidden="true" href="#user-content-other-options"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a>Other options</h3> <ul dir="auto"> <li><code>--no-prod</code> deploys to the project without updating the "production" URL alias to point to that new deployment. Without that option all deploys go directly to production.</li> <li><code>--debug</code> enables the Vercel CLI debug output.</li> <li><code>--token</code> allows you to pass a Now authentication token, rather than needing to first run <code>now login</code> to configure the tool. Tokens can be created in the Vercel web dashboard under Account Settings -&gt; Tokens.</li> <li><code>--public</code> runs <code>vercel --public</code> to publish the application source code at <code>/_src</code> e.g. <a href="https://datasette-public.now.sh/_src" rel="nofollow">https://datasette-public.now.sh/_src</a> and make recent logs visible at <code>/_logs</code> e.g. <a href="https://datasette-public.now.sh/_logs" rel="nofollow">https://datasette-public.now.sh/_logs</a></li> <li><code>--generate-dir</code> - by default this tool generates a new Vercel app in a temporary directory, deploys it and then deletes the directory. Use <code>--generate-dir=my-app</code> to output the generated application files to a new directory of your choice instead. You can then deploy it by running <code>vercel</code> in that directory.</li> <li><code>--setting default_page_size 10</code> - use this to set Datasette settings, as described in <a href="https://docs.datasette.io/en/stable/settings.html" rel="nofollow">the documentation</a>. This is a replacement for the unsupported <code>--extra-options</code> option.</li> </ul> <h3 dir="auto"><a id="user-content-full-help" class="anchor" aria-hidden="true" href="#user-content-full-help"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a>Full help</h3> <p dir="auto"><strong>Warning:</strong> Some of these options are not yet implemented by this plugin. In particular, the following do not yet work:</p> <ul dir="auto"> <li><code>--extra-options</code> - use <code>--setting</code> described above instead.</li> <li><code>--plugin-secret</code></li> <li><code>--version-note</code></li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ datasette publish vercel --help Usage: datasette publish vercel [OPTIONS] [FILES]... Publish to https://vercel.com/ Options: -m, --metadata FILENAME Path to JSON/YAML file containing metadata to publish --extra-options TEXT Extra options to pass to datasette serve --branch TEXT Install datasette from a GitHub branch e.g. main --template-dir DIRECTORY Path to directory containing custom templates --plugins-dir DIRECTORY Path to directory containing custom plugins --static MOUNT:DIRECTORY Serve static files from this directory at /MOUNT/... --install TEXT Additional packages (e.g. plugins) to install --plugin-secret &lt;TEXT TEXT TEXT&gt;... Secrets to pass to plugins, e.g. --plugin-secret datasette-auth-github client_id xxx --version-note TEXT Additional note to show on /-/versions --secret TEXT Secret used for signing secure values, such as signed cookies --title TEXT Title for metadata --license TEXT License label for metadata --license_url TEXT License URL for metadata --source TEXT Source label for metadata --source_url TEXT Source URL for metadata --about TEXT About label for metadata --about_url TEXT About URL for metadata --token TEXT Auth token to use for deploy --project PROJECT Vercel project name to use [required] --scope TEXT Optional Vercel scope (e.g. a team name) --no-prod Don't deploy directly to production --debug Enable Vercel CLI debug output --public Publish source with Vercel CLI --public --generate-dir DIRECTORY Output generated application files and stop without deploying --generate-vercel-json Output generated vercel.json file and stop without deploying --vercel-json FILENAME Custom vercel.json file to use instead of generating one --setting SETTING... Setting, see docs.datasette.io/en/stable/settings.html --crossdb Enable cross-database SQL queries --help Show this message and exit."><pre class="notranslate"><code>$ datasette publish vercel --help Usage: datasette publish vercel [OPTIONS] [FILES]... Publish to https://vercel.com/ Options: -m, --metadata FILENAME Path to JSON/YAML file containing metadata to publish --extra-options TEXT Extra options to pass to datasette serve --branch TEXT Install datasette from a GitHub branch e.g. main --template-dir DIRECTORY Path to directory containing custom templates --plugins-dir DIRECTORY Path to directory containing custom plugins --static MOUNT:DIRECTORY Serve static files from this directory at /MOUNT/... --install TEXT Additional packages (e.g. plugins) to install --plugin-secret &lt;TEXT TEXT TEXT&gt;... Secrets to pass to plugins, e.g. --plugin-secret datasette-auth-github client_id xxx --version-note TEXT Additional note to show on /-/versions --secret TEXT Secret used for signing secure values, such as signed cookies --title TEXT Title for metadata --license TEXT License label for metadata --license_url TEXT License URL for metadata --source TEXT Source label for metadata --source_url TEXT Source URL for metadata --about TEXT About label for metadata --about_url TEXT About URL for metadata --token TEXT Auth token to use for deploy --project PROJECT Vercel project name to use [required] --scope TEXT Optional Vercel scope (e.g. a team name) --no-prod Don't deploy directly to production --debug Enable Vercel CLI debug output --public Publish source with Vercel CLI --public --generate-dir DIRECTORY Output generated application files and stop without deploying --generate-vercel-json Output generated vercel.json file and stop without deploying --vercel-json FILENAME Custom vercel.json file to use instead of generating one --setting SETTING... Setting, see docs.datasette.io/en/stable/settings.html --crossdb Enable cross-database SQL queries --help Show this message and exit. </code></pre></div> <h2 dir="auto"><a id="user-content-using-a-custom-verceljson-file" class="anchor" aria-hidden="true" href="#user-content-using-a-custom-verceljson-file"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a>Using a custom <code>vercel.json</code> file</h2> <p dir="auto">If you want to add additional redirects or similar to your Vercel configuration you may want to provide a custom <code>vercel.json</code> file.</p> <p dir="auto">To do this, first generate a configuration file (without running a deploy) using the <code>--generate-vercel-json</code> option:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="datasette publish vercel my-database.db \ --project=my-database \ --generate-vercel-json &gt; vercel.json"><pre class="notranslate"><code>datasette publish vercel my-database.db \ --project=my-database \ --generate-vercel-json &gt; vercel.json </code></pre></div> <p dir="auto">You can now edit the <code>vercel.json</code> file that this creates to add your custom options.</p> <p dir="auto">Then run the deploy using:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="datasette publish vercel my-database.db \ --project=my-database \ --vercel-json=vercel.json"><pre class="notranslate"><code>datasette publish vercel my-database.db \ --project=my-database \ --vercel-json=vercel.json </code></pre></div> <h2 dir="auto"><a id="user-content-setting-a-datasette_secret" class="anchor" aria-hidden="true" href="#user-content-setting-a-datasette_secret"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a>Setting a <code>DATASETTE_SECRET</code></h2> <p dir="auto">Datasette uses <a href="https://docs.datasette.io/en/stable/settings.html#configuring-the-secret" rel="nofollow">a secret string</a> for purposes such as signing authentication cookies. This secret is reset when the server restarts, which will sign out any users who are authenticated using a signed cookie.</p> <p dir="auto">You can avoid this by generating a <code>DATASETTE_SECRET</code> secret string and setting that as a <a href="https://vercel.com/docs/concepts/projects/environment-variables" rel="nofollow">Vercel environment variable</a>. If you do this the secret will stay consistent and your users will not be signed out.</p> <h2 dir="auto"><a id="user-content-using-this-with-github-actions" class="anchor" aria-hidden="true" href="#user-content-using-this-with-github-actions"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a>Using this with GitHub Actions</h2> <p dir="auto">This plugin can be used together with <a href="https://github.com/features/actions">GitHub Actions</a> to deploy Datasette instances automatically on new pushes to a repo, or on a schedule.</p> <p dir="auto">The GitHub Actions runners already have the Vercel deployment tool installed. You'll need to create an API token for your account at <a href="https://vercel.com/account/tokens" rel="nofollow">vercel.com/account/tokens</a>, and store that as a secret in your GitHub repository called <code>VERCEL_TOKEN</code>.</p> <p dir="auto">Make sure your workflow has installed <code>datasette</code> and <code>datasette-publish-vercel</code> using <code>pip</code>, then add the following step to your GitHub Actions workflow:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" - name: Deploy Datasette using Vercel env: VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} run: |- datasette publish vercel mydb.db \ --token $VERCEL_TOKEN \ --project my-vercel-project"><pre class="notranslate"><code> - name: Deploy Datasette using Vercel env: VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} run: |- datasette publish vercel mydb.db \ --token $VERCEL_TOKEN \ --project my-vercel-project </code></pre></div> <p dir="auto">You can see a full example of a workflow that uses Vercel in this way <a href="https://github.com/simonw/til/blob/12b3f0d3679320cbeafa5df164bbc08ba703625d/.github/workflows/build.yml">in the simonw/til repository</a>.</p> </article></div> 1 public 0   0  

Links from other tables

  • 23 rows from repo in releases
Powered by Datasette · Queries took 1.16ms