-
Notifications
You must be signed in to change notification settings - Fork 868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add instructions for GitLab Pages #1287
base: main
Are you sure you want to change the base?
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this missing an external link or aim is to reference the section below ? For the later case, I think we should make the link explicit using an explicit id. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm just using the same trick (?) that is used in github-pages.qmd: A link with no target pointing to an anchor for a heading on the same page. |
||
|
||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This tables is currently only listing what is available through
quarto publish
. Any other provider is supposed to be mentioned in Other services.It could be confusing to put Gitlab pages at first level, as it is not directly supported in
quarto publish gitlab-pages