-
Notifications
You must be signed in to change notification settings - Fork 405
64 lines (54 loc) · 1.8 KB
/
Copy pathdocs-deploy.yml
File metadata and controls
64 lines (54 loc) · 1.8 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Builds the documentation site in docs/ with Hugo and publishes it to
# GitHub Pages (docker.github.io/docker-agent). Replaces the legacy
# branch-based Jekyll build; docs.docker.com renders the same Markdown
# source through its Hugo module mount (see docs-upstream.yml).
name: docs-deploy
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
on:
push:
branches: [main]
paths:
- ".github/workflows/docs-deploy.yml"
- "docs/**"
workflow_dispatch:
env:
# Kept in sync with the docker/docs HUGO_VERSION pin so both surfaces
# render with the same Hugo release.
HUGO_VERSION: 0.163.0
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install Hugo
run: |
curl -fsSL "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz" \
| sudo tar -xz -C /usr/local/bin hugo
hugo version
- name: Configure Pages
id: pages
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
- name: Build site
working-directory: docs
run: hugo --gc --baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: docs/public
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@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0