base > docs > workflows > GitHub Pages Deployment
The GitHub Pages deployment workflow is defined in .github/workflows/pages.yml. Its purpose is to build and deploy the repository's content as a GitHub Pages website.
This workflow is triggered by:
- A
pushto themainbranch. - A manual
workflow_dispatchevent, allowing it to be run from the Actions tab in GitHub.
The workflow is granted the following permissions:
contents: readto read the repository's content.pages: writeto deploy to GitHub Pages.id-token: writeto authenticate with GitHub Pages.
The workflow uses a concurrency group named "pages" to ensure that only one deployment runs at a time. If a new workflow run is triggered while another is in progress, the new run will be queued. However, in-progress runs are not cancelled.
This job runs on ubuntu-latest and performs the following steps to build the site:
- Checkout: Checks out the repository's code.
- Setup Pages: Configures the GitHub Pages environment.
- Build with Jekyll: Uses the
actions/jekyll-build-pagesaction to build the site with Jekyll. The source is the root of the repository (./), and the destination for the built site is./_site. - Upload artifact: Uploads the built site as a GitHub Pages artifact.
This job also runs on ubuntu-latest and depends on the successful completion of the build job. It performs the following steps to deploy the site:
- Deploy to GitHub Pages: Uses the
actions/deploy-pagesaction to deploy the artifact from thebuildjob to GitHub Pages. The environment is configured forgithub-pages, and the URL of the deployed site is made available as an output.