forked from argoproj/argo-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (49 loc) · 1.44 KB
/
docs.yaml
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
name: Docs
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
docs:
runs-on: ubuntu-latest
permissions:
contents: write # for publishing the docs to GH Pages
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.9
- uses: actions/setup-go@v4
with:
go-version: '1.21'
- uses: actions/setup-node@v3
with:
node-version: "19"
# Use the same make target both locally and on CI to make it easier to debug failures.
- name: Build & Lint docs
run: make docs
# If markdownlint fixes issues, files will be changed. If so, fail the build.
- name: Check if markdownlint --fix made changes
run: git diff --exit-code
# Upload the site so reviewers see it.
- name: Upload Docs Site
uses: actions/upload-artifact@v3
with:
name: docs
path: site
if-no-files-found: error
- name: Publish to GH Pages (when on master)
if: github.repository == 'argoproj/argo-workflows' && github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./site