-
Notifications
You must be signed in to change notification settings - Fork 263
54 lines (45 loc) · 1.19 KB
/
update-wiki-docs.yml
File metadata and controls
54 lines (45 loc) · 1.19 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
name: Update wiki docs
on:
release:
types: [published]
concurrency:
group: wiki
cancel-in-progress: true
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.25.8'
- name: Build Binary and generate doc markdown files
run: |
mkdir -p output
go build -o output/azcopy
cd output
./azcopy doc --format wiki
cd doc
sed -i 's/\.md//' *
- name: Upload build artifacts
uses: actions/upload-artifact@v7
with:
name: build-artifacts
path: output/doc/
- name: Checkout Wiki
uses: actions/checkout@v4
with:
repository: ${{github.repository}}.wiki
path: ${{github.repository}}.wiki
- name: Push to wiki
run: |
set -e
cd $GITHUB_WORKSPACE/${{github.repository}}.wiki
cp -r ../../output/doc/* .
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git diff-index --quiet HEAD || git commit -m "action: wiki sync" && git push