Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto generation of markdown doc files and update the wiki. #2860

Merged
merged 4 commits into from
Jan 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/update-wiki-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Update wiki docs

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

concurrency:
group: wiki
cancel-in-progress: true

permissions:
wonwuakpa-msft marked this conversation as resolved.
Show resolved Hide resolved
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.23.1'

- name: Build Binary and generate doc markdown files
run: |
mkdir -p output
go build -o output/azcopy
cd output
./azcopy doc
cd doc
sed -i 's/\.md//' *

- name: Upload build artifacts
uses: actions/upload-artifact@v4
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 "[email protected]"
git config --local user.name "GitHub Action"
git add .
git diff-index --quiet HEAD || git commit -m "action: wiki sync" && git push
Loading