-
Notifications
You must be signed in to change notification settings - Fork 3
40 lines (38 loc) · 1.22 KB
/
build.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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- name: Build
shell: pwsh
run: |
pip install sphinx
pip install solar-theme
.\docs\make.bat html
- name: Create archive artifact
shell: pwsh
run: Copy-Item -Recurse .\docs\build\html .\docs\build\dfir-orc-doc
- name: Upload archive artifact
uses: actions/upload-artifact@v3
with:
name: dfir-orc-doc.zip
path: .\docs\build\dfir-orc-doc
- name: Publish html pages
if: github.ref == 'refs/heads/master'
shell: pwsh
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
run: |
git clone --single-branch --branch master "https://$ENV:[email protected]/DFIR-ORC/dfir-orc.github.io.git"
Copy-Item -Force -Recurse .\docs\build\html\* dfir-orc.github.io/
cd dfir-orc.github.io/
git add --all
git status
git -c "user.name=dfir-orc-bot" -c "[email protected]" commit -m "Update by GitHub Action"
git push