-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (38 loc) · 1.23 KB
/
headless-lms-doc.yml
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
name: headless-lms docs
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
# New commits cancel previous builds only on pull requests. This is because `github.head_ref`` is only set on pull requests and `github.sha`` is unique for each commit.
group: headless-lms-doc-${{ github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Update rust to get edition 2021 support
run: rustup update stable
- name: Run npm ci
run: npm ci && git config --unset core.hooksPath
- name: Generate doc files
run: |
bin/generate-doc-files
npm run eslint:format-generated-docs
- name: Generate documentaion
run: cargo doc --document-private-items
working-directory: services/headless-lms
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: services/headless-lms/target/doc
if: ${{ github.ref == 'refs/heads/master' }}