Deploy #678
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: | |
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 | |
- name: Generate Tool | |
shell: cmd | |
run: | | |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat | |
Odin\odin build . -out:odin-html-docs.exe | |
- name: Generate Website | |
shell: cmd | |
run: | | |
copy odin-html-docs.exe website\odin-html-docs.exe | |
copy Odin\all.odin-doc website\all.odin-doc | |
copy favicon.svg website\static\favicon.svg | |
copy style.css website\static\style.css | |
copy search.js website\static\search.js | |
copy CNAME website\static\CNAME | |
pushd website\static | |
..\odin-html-docs.exe ..\all.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' |