Skip to content

Commit

Permalink
Merge pull request #13 from mattverse/mattverse/generate-docs-workflow
Browse files Browse the repository at this point in the history
Mattverse/generate docs workflow
  • Loading branch information
mattverse authored Jun 8, 2023
2 parents 0c97a97 + 63b43fa commit f99f7d3
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/generate-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Generate Docs

on:
workflow_dispatch:
push:
branches:
- main
- test-workflow



jobs:
generate-docs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.16

- name: Install yq
run: |
sudo wget https://github.com/mikefarah/yq/releases/download/v4.6.1/yq_linux_amd64 -O /usr/bin/yq
sudo chmod +x /usr/bin/yq
- name: Install protobuf compiler
run: |
sudo apt-get install -y protobuf-compiler
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Run the script
run: bash ./scripts/generate-docs.sh

- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
git commit -m "Add changes" || exit 0
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: "Generated docs updates"
body: "Updates to generated docs"
branch: "generate-docs-updates"

0 comments on commit f99f7d3

Please sign in to comment.