-
Notifications
You must be signed in to change notification settings - Fork 11
48 lines (40 loc) · 1.18 KB
/
Copy pathpages.yml
File metadata and controls
48 lines (40 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Deploy GitHub Pages
# Replaces the legacy branch-based Pages build (was: source = main /docs).
# This workflow uploads docs/ as a Pages artifact and deploys via the
# official actions/deploy-pages action. Faster and more reliable than the
# legacy Jekyll path, especially when the docs/ tree contains many large
# pre-rendered HTML files.
on:
push:
branches: [main]
paths:
- "docs/**"
- ".github/workflows/pages.yml"
workflow_dispatch:
# Allow GITHUB_TOKEN to deploy to Pages.
permissions:
contents: read
pages: write
id-token: write
# Only one Pages deployment at a time; cancel in-progress runs on new push.
concurrency:
group: pages
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload docs/ as Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4