Skip to content

Deploy website to GitHub Pages #2

Deploy website to GitHub Pages

Deploy website to GitHub Pages #2

Workflow file for this run

name: Deploy website to GitHub Pages
# Publishes the marketing site in /site to GitHub Pages on every push to main
# (or when run manually). Settings → Pages → Source must be set to
# "GitHub Actions".
on:
push:
branches: [main, master]
paths:
- "site/**"
- ".github/workflows/pages.yml"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment; cancel in-progress ones.
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Add .nojekyll (serve files as-is)
run: touch site/.nojekyll
- name: Upload site artifact
uses: actions/upload-pages-artifact@v3
with:
path: site
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4