-
Notifications
You must be signed in to change notification settings - Fork 3
63 lines (62 loc) Β· 1.8 KB
/
code.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
name: π Code
on:
push:
branches: [main]
paths:
- ".github/workflows/code.yml"
pull_request:
branches: [main]
paths:
- ".github/workflows/code.yml"
schedule:
- cron: "30 4 * * 4"
workflow_dispatch: {}
jobs:
generate:
runs-on: ubuntu-latest
timeout-minutes: 30
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
environment: code
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
token: ${{ secrets.GITHUB_TOKEN }}
submodules: recursive
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
- name: β‘ Dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y zsh tree
sudo make -C lib/zsdoc install
- name: π Setup Ruby
uses: ruby/setup-ruby@af848b40be8bb463a751551a1180d74782ba8a72
with:
ruby-version: 3.1
bundler-cache: true
- name: π Install asciidoctor-pdf and rouge
run: gem install asciidoctor-pdf rouge
- name: β»οΈ Generate Code
run: |
make -C code
make -C code clean
- name: π Compress code documentation
run: tar cvzf code.tar.gz code
- name: π€ Upload code.tar.gz
uses: actions/upload-artifact@v4
with:
name: code documentation
path: code.tar.gz
- name: β»οΈ Cleanup
run: rm -rf code.tar.gz
- name: "π Commit"
if: ${{ github.event_name != 'pull_request' }}
uses: z-shell/.github/actions/commit@main
with:
commitMessage: Code ${{ github.sha }}
workDir: code
commitUserName: digital-teams[bot]
commitUserEmail: [email protected]