-
Notifications
You must be signed in to change notification settings - Fork 21
68 lines (66 loc) · 2.9 KB
/
deploy.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
64
65
66
67
68
name: Deploy
on:
workflow_dispatch:
push:
schedule:
- cron: 0 21 * * *
jobs:
deploy:
runs-on: windows-2019
steps:
- uses: actions/checkout@v1
- name: Make initial directories
shell: cmd
run: |
mkdir website
mkdir website\static
- name: Clone Odin repo
shell: cmd
run: |
git clone https://github.com/odin-lang/Odin.git
- name: build Odin
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
cd Odin
call .\build.bat 1 1
- name: Odin run
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
cd Odin
odin run examples/demo
- name: Generation doc format for examples/all
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
cd Odin
odin doc examples/all -all-packages -doc-format -show-debug-messages -target:windows_amd64
odin doc examples/all/all_posix.odin -file -all-packages -doc-format -show-debug-messages -target:darwin_arm64
odin doc core/sys/darwin -all-packages -doc-format -show-debug-messages -target:darwin_arm64
odin doc core/sys/freebsd -all-packages -doc-format -show-debug-messages -target:freebsd_amd64
odin doc core/sys/linux -all-packages -doc-format -show-debug-messages -target:linux_amd64
odin doc core/sys/unix -all-packages -doc-format -show-debug-messages -target:linux_amd64
odin doc core/sys/haiku -all-packages -doc-format -show-debug-messages -target:haiku_amd64
- name: Generate Tool
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
Odin\odin build . -debug -out:odin-html-docs.exe
- name: Generate Website
shell: cmd
run: |
copy odin-html-docs.exe website\odin-html-docs.exe
copy Odin\*.odin-doc website\*.odin-doc
copy resources\CNAME website\static\CNAME
copy resources\favicon.svg website\static\favicon.svg
pushd website\static
..\odin-html-docs.exe ..\all.odin-doc --merge ..\darwin.odin-doc ..\all_posix.odin-doc ..\freebsd.odin-doc ..\linux.odin-doc ..\unix.odin-doc ..\haiku.odin-doc
popd
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website/static
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'