actions/deploy-pages@v5

A GitHub Action to deploy an artifact as a GitHub Pages site

At a glance

Latest major
v5
Repository
actions/deploy-pages
Inputs
6 (1 required)
Outputs
1
Runs using
node24
License
MIT
Last checked

Inputs and outputs come straight from the action's official action.yml. See our editorial standards.

Usage

- uses: actions/deploy-pages@v5

Inputs

NameRequiredDefaultDescription
tokenYes${{ github.token }}GitHub token
timeoutNo600000Time in milliseconds after which to timeout and cancel the deployment (default: 10 minutes)
error_countNo10Maximum number of status report errors before cancelling a deployment (default: 10)
reporting_intervalNo5000Initial time between deployment status reports; successful polls use capped backoff and jitter, with error backoff added separately (default: 5 seconds)
artifact_nameNogithub-pagesName of the artifact to deploy
previewNofalseIs this attempting to deploy a pull request as a GitHub Pages preview site? (NOTE: This feature is only in alpha currently and is not available to the public!)

Outputs

NameDescription
page_urlURL to deployed GitHub Pages

Read an output with ${{ steps.<step-id>.outputs.<name> }}; the step needs an id.

Examples

Publish to GitHub Pages

Deploy the artifact uploaded earlier; needs the github-pages environment and OIDC permission.

name: Example
on:
  push:
    branches: [main]

permissions:
  contents: read
  pages: write
  id-token: write

jobs:
  example:
    runs-on: ubuntu-latest
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    steps:
      - name: Deploy GitHub Pages site
        id: deployment
        uses: actions/deploy-pages@v5
      - name: Use the output
        run: echo "page_url = ${{ steps.deployment.outputs.page_url }}"

Each example passed actionlint (syntax, expressions and the inputs it knows for this action). They were not run in a live repository, so replace placeholder values such as names, ARNs and paths with your own.

Something out of date or wrong? Report it on our Contact page. This page is rebuilt from the action's repository roughly once a week.