Deploy #1164
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |