forked from lexica/lexica
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (31 loc) · 1.09 KB
/
api.yml
File metadata and controls
41 lines (31 loc) · 1.09 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
name: Generate and publish the Lexica API
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
generate-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 11
- name: Build API files
run: ./gradlew :api-generator:generateApi
# This and the following step is based on https://kaizendorks.github.io/2020/04/16/vuepress-github-actions/
- name: Init new repo in ./build/api and commit generated API files
run: |
cd ./build/api-generator/
git init
git add -A
git config --local user.email "[email protected]"
git config --local user.name "Lexica API GitHub Action"
git commit -m "[GitHub Actions] Deploy Lexica API for $GITHUB_SHA"
- name: Force push to gh-pages branch
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
force: true
directory: ./build/api-generator/