build(ci): fix proto swagger gen #4943
Workflow file for this run
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: Docs | |
# Docs build and publishes the Vuepress documentation website. | |
# This workflow is run on every pull request and push on master. | |
# The deployment of the docs is made only on each push on master. | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
Generate-Swagger-and-Deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout PR 🛎️ | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: actions/checkout@v3 | |
with: | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
ref: ${{ github.event.pull_request.head.ref }} | |
- name: Checkout branch 🛎️ | |
if: ${{ github.event_name != 'pull_request' }} | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Create proto cache directory 🔧 | |
run: sudo mkdir -p /.cache && sudo chmod -R 777 /.cache | |
- name: Build 🔧 | |
run: | |
make proto-swagger-gen | |
- name: Commit ✅ | |
uses: endbug/add-and-commit@v9 | |
with: | |
add: "client/docs" | |
message: "docs: update Swagger definition" | |
push: true | |
- name: Deploy 🚀 | |
if: github.ref == 'refs/heads/master' | |
uses: JamesIves/github-pages-deploy-action@v4.4.2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: swagger-pages | |
folder: client/docs |