Merge pull request #977 from aziontech/dev #157
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate docs and upload to wiki | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: golang:1.22.5 | |
env: | |
CGO_ENABLED: 0 # Statically linked | |
steps: | |
- name: Setting GIT | |
run: git config --global url."https://${{ secrets.GLOBAL_TOKEN }}:x-oauth-basic@github.com/aziontech".insteadOf "https://github.com/aziontech" | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Generate docs | |
run: go run ./cmd/gen_docs/main.go --file-type "md" --doc-path "/tmp/docs" | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
repository: ${{github.repository}}.wiki | |
- name: Copy files | |
run: cp /tmp/docs/* . | |
- name: Commit files | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -m "Add changes" | |
git push |