diff --git a/docs/publishing/ci.qmd b/docs/publishing/ci.qmd index 787e0b6977..be90763791 100644 --- a/docs/publishing/ci.qmd +++ b/docs/publishing/ci.qmd @@ -38,7 +38,7 @@ Below we'll describe how to implement each of these strategies using [GitHub Act ## GitHub Actions -[GitHub Actions](https://docs.github.com/en/actions){data-heading="GitHub Actions"} is a Continuous Integration service from GitHub, and an excellent choice if your source code is already managed it a GitHub repository. Quarto makes available a set of [standard](https://github.com/quarto-dev/quarto-actions) GitHub Actions that make it easy to install Quarto and then render and publish content. +[GitHub Actions](https://docs.github.com/en/actions){data-heading="GitHub Actions"} is a Continuous Integration service from GitHub, and an excellent choice if your source code is already managed in a GitHub repository. Quarto makes available a set of [standard](https://github.com/quarto-dev/quarto-actions) GitHub Actions that make it easy to install Quarto and then render and publish content. Learn about using GitHub Actions with various publishing services here: @@ -48,6 +48,12 @@ Learn about using GitHub Actions with various publishing services here: If you want to use the standard Quarto actions as part of another workflow see the [GitHub Actions for Quarto](https://github.com/quarto-dev/quarto-actions) repository. +## GitLab Pipelines + +[GitLab Pipelines](https://docs.gitlab.com/ee/ci/pipelines/){data-heading="GitLab Pipelines"} is a Continuous Integration service from GitLab, and an excellent choice if your source code is already managed in a GitLab repository. Quarto makes available a set of [Docker images](https://github.com/orgs/quarto-dev/packages) that make it easy to use Quarto to render and publish content with GitLab Pipelines. + +Learn about using GitLab Pipelines to publish your site with [GitLab Pages](gitlab-pages.qmd). + ## Posit Connect If you are publishing a source code version of your content to Posit Connect it's possible to configure Connect to retrieve the code from a Git repository and then render and execute on the Connect Server. diff --git a/docs/publishing/gitlab-pages.qmd b/docs/publishing/gitlab-pages.qmd new file mode 100644 index 0000000000..6ffd94e1dc --- /dev/null +++ b/docs/publishing/gitlab-pages.qmd @@ -0,0 +1,34 @@ +--- +title: "GitLab Pages" +--- + +## Overview + +[GitLab Pages](https://pages.github.com/) is a website hosting service that enables you to publish content based on source code managed within a GitLab repository. + +There s currently only one way to publish Quarto websites and documents to GitLab Pages: + +1. Use a [GitLab Pipeline] to automatically render your files (a single Quarto document or a Quarto project) and publish the resulting content whenever you push a source code change to your repository. + +We'll cover each of these methods below, but first an important pre-requisite: you need to have a Git repository on your local machine that is synced to GitLab. The URL of the published website will be derived from the combination of your username and the repository name (e.g. `https://username.gitlab.io/reponame/`). + +You can optionally configure a [custom domain](https://docs.gitlab.com/ee/user/project/pages/custom_domains_ssl_tls_certification/) for a GitLab Pages site, but before exploring that ground you should get your site up and running with the default domain. + +### GitLab Pipeline + +Before setting up the pipeline, add at least one file that will get rendered and deployed. Enable the pipeline by adding a `.gitlab-ci.yml` file to your repository: + +``` {.yaml filename=".gitlab-ci.yml"} +image: ghcr.io/quarto-dev/quarto:latest + +pages: + script: + - quarto render --execute --to html --output-dir public + artifacts: + paths: + - public +``` + +This pipeline will run whenever you push to your repository. It will also run when you manually trigger the pipeline from the **Build - Pipelines** page of your repository. + +The pipeline will render your content and publish it to GitLab Pages using the minimal [official Docker image](https://github.com/orgs/quarto-dev/packages) from Quarto. Switch from `ghcr.io/quarto-dev/quarto:latest` to `ghcr.io/quarto-dev/quarto-full:latest` to get programming and LaTeX support. diff --git a/docs/publishing/index.qmd b/docs/publishing/index.qmd index 99180d65e6..ac8f57d42a 100644 --- a/docs/publishing/index.qmd +++ b/docs/publishing/index.qmd @@ -8,6 +8,6 @@ There are a wide variety of ways to publish documents, presentations, and websit ## Getting Started -To get started, review the documentation for using one of the following publishing services: +To get started, review the documentation for using one of the following publishing providers supported by the `quarto publish` command: {{< include _providers.md >}} diff --git a/docs/publishing/other.qmd b/docs/publishing/other.qmd index 617cdcc565..94fb56c745 100644 --- a/docs/publishing/other.qmd +++ b/docs/publishing/other.qmd @@ -4,7 +4,7 @@ title: "Other Services" ## Overview -There are a wide variety of ways to publish Quarto websites. Other articles cover publishing to [Quarto Pub](quarto-pub.qmd), [GitHub Pages](github-pages.qmd), [Netlify](netlify.qmd), and [Posit Connect](rstudio-connect.qmd). Below we'll describe some general guidelines as well as offer some specific advice for [Firebase](#google-firebase), [Site44], and [Amazon S3]. We'll mostly defer to the documentation provided by the various services, but will note any Quarto website specific configuration required. +There are a wide variety of ways to publish Quarto websites. Other articles cover publishing to [Quarto Pub](quarto-pub.qmd), [GitHub Pages](github-pages.qmd), [GitLab Pages](gitlab-pages.qmd), [Netlify](netlify.qmd), and [Posit Connect](rstudio-connect.qmd). Below we'll describe some general guidelines as well as offer some specific advice for [Firebase](#google-firebase), [Site44], and [Amazon S3]. We'll mostly defer to the documentation provided by the various services, but will note any Quarto website specific configuration required. The most important thing to understand is that website content is by default written to the `_site` sub-directory and book content to the `_book` directory (you can customize either using the `output-dir` option). Publishing is simply a matter of copying the output directory to a web server or web hosting service. @@ -44,4 +44,4 @@ If you are a user of Amazon Web Services you can serve your website directly fro Any web server or web host can be used to deploy a Quarto website. Here's a recent [CNET roundup](https://www.cnet.com/web-hosting/) of other web hosts you could consider. You can also deploy a Quarto website on any internal (intranet) web server. -You can also render and publish Quarto websites using a Continuous Integration (CI) service. See the articles on [Publishing with CI](ci.qmd) for additional details. \ No newline at end of file +You can also render and publish Quarto websites using a Continuous Integration (CI) service. See the articles on [Publishing with CI](ci.qmd) for additional details.