-
Notifications
You must be signed in to change notification settings - Fork 54
56 lines (48 loc) · 1.62 KB
/
docs-gen-and-push.yml
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
name: Generate and push docs
run-name: Generate and push docs - ${{ github.ref_name }}
on:
# So we can trigger manually if needed
workflow_dispatch:
# To confirm any changes to docs build successfully, without deploying them
push:
branches:
- "release-*"
- "doc-*"
paths:
- "docs/**"
- "*.md"
- ".github/workflows/docs-gen-and-push.yaml"
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}
jobs:
debug:
name: print relevant info
runs-on: ubuntu-latest
steps:
- run: |
echo "github.actor=${{ github.actor }}"
echo "github.action_ref=${{ github.action_ref }}"
echo "github.event_name=${{ github.event_name }}"
echo "github.head_ref=${{ github.head_ref }}"
echo "github.ref=${{ github.ref }}"
echo "github.ref_name=${{ github.ref_name }}"
echo "github.repository_owner=${{ github.repository_owner }}"
echo "github.triggering_actor=${{ github.triggering_actor }}"
echo "GITHUB_ACTION_REF=$GITHUB_ACTION_REF"
generate-and-push:
if: github.repository_owner == 'kubestellar' || github.repository_owner == github.actor
name: Generate and push docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
with:
token: ${{ github.repository_owner == 'kubestellar' && secrets.GH_ALL_PROJECT_TOKEN || github.token }}
persist-credentials: 'true'
- run: git fetch origin gh-pages
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- run: make deploy-docs