Repository navigation
70 lines (57 loc) · 2.04 KB
/
Copy pathrelease-docs.yml
File metadata and controls
70 lines (57 loc) · 2.04 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
65
66
67
68
69
70
# SPDX-FileCopyrightText: 2026 PythonWoods <dev@pythonwoods.dev>
# SPDX-License-Identifier: Apache-2.0
name: Zenzic Docs Release Docs
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
deployments: write
concurrency:
group: release-docs-${{ github.ref }}
cancel-in-progress: false
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
enable-cache: true
- name: Build Docs
run: |
uv run --extra docs mkdocs build --strict
- name: Set artifact name
id: vars
run: |
if [ "${{ github.ref_type }}" = "tag" ]; then
echo "name=docs-build-${{ github.ref_name }}" >> "$GITHUB_OUTPUT"
else
echo "name=docs-build-run-${{ github.run_number }}" >> "$GITHUB_OUTPUT"
fi
- name: Archive build output
run: tar -czf "${{ steps.vars.outputs.name }}.tar.gz" site
- name: Upload workflow artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ steps.vars.outputs.name }}
path: ${{ steps.vars.outputs.name }}.tar.gz
retention-days: 30
- name: Publish GitHub release (tags only)
if: github.ref_type == 'tag'
uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3
with:
files: ${{ steps.vars.outputs.name }}.tar.gz
generate_release_notes: true
- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@ebbaa1584979971c8614a24965b4405ff95890e0 # v4.0.0
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy site --project-name=zenzic-doc
wranglerVersion: "3.90.0"