Repository navigation
51 lines (44 loc) · 1.78 KB
/
Copy pathdocs-deploy.yml
File metadata and controls
51 lines (44 loc) · 1.78 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
name: Deploy docs to GitHub Pages
on:
workflow_dispatch:
# GitHub ignores path filters on manual triggers, so workflow_dispatch deploy unconditionally.
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+' # Matches Core SemVer versions - without a prefix: 0.9.0, 1.2.3
- '[a-zA-Z]+[0-9]+.[0-9]+.[0-9]+' # Matches Core SemVer versions - with a prefix: v1.0.0, ver1.0.0, RC1.0.0
- '[0-9]+.[0-9]+.[0-9]+*' # Matches Build and Prerelease SemVer versions - without a prefix: 0.9.0+1.03ed4d1, 0.9.0-alpha1, 0.9.0-alpha1+1.03ed4d1
- '[a-zA-Z]+[0-9]+.[0-9]+.[0-9]+*' # Matches Build and Prerelease SemVer versions - with a prefix: v0.9.0+1.03ed4d1, ver0.9.0-alpha1, RC0.9.0-alpha1+1.03ed4d1
# GitHub ignores path filters on tag pushes, so tags deploy unconditionally.
branches:
- main
# GitHub reads path filters on branch pushes, so main deploy only when docs are changed.
paths:
- 'docs/**'
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: docs-pages
cancel-in-progress: true
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Fetch full history to ensure we can merge and push
- name: Build and deploy docs
id: deploy
uses: mindovermachine-dev/remote-astro-theme/docs-deploy@v1
with:
docs-path: docs
# node-version: 22 # default is 24
# version: ^0.1.0 # default is latest
- name: Trigger an index update
env:
GH_TOKEN: ${{ secrets.DOCS_INDEX }}
run: gh workflow --repo mindovermachine-dev/mindovermachine-dev.github.io run docs-deploy.yml