Repository navigation
57 lines (48 loc) · 1.57 KB
/
Copy pathdocumentation.yml
File metadata and controls
57 lines (48 loc) · 1.57 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
55
56
57
name: Update Documentation
on:
push:
branches: [main]
paths:
- "server/**"
- ".github/workflows/server**"
- ".github/workflows/documentation.yml"
- "scripts/start-server.sh"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install latest stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v2
with:
prefix-key: "bloop"
shared-key: "doc"
- name: Start webserver and fetch OpenAPI
run: |
bash ${GITHUB_WORKSPACE}/scripts/start-server.sh
mkdir temp_openapi
cp server/bleep/src/query/grammar.pest temp_openapi/grammar.pest
cd temp_openapi
curl http://localhost:7878/api-doc/openapi.json --output openapi.json
shell: bash
- name: Push to another api-docs repository
uses: cpina/github-action-push-to-another-repository@9e487f29582587eeb4837c0552c886bb0644b6b9
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
source-directory: "temp_openapi"
destination-github-username: "BloopAI"
destination-repository-name: "bloop-api-docs"
target-branch: main
target-directory: "auto_update_openapi"
user-email: "louis@bloop.ai"
user-name: "stunningpixels"