Github actions #41
Workflow file for this run
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 docs | |
on: | |
push: | |
branches: | |
- main | |
- master | |
pull_request: | |
branches: | |
- main | |
- master | |
jobs: | |
build: | |
name: Deploy docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download source | |
uses: actions/checkout@v2 | |
- name: Install Crystal | |
uses: oprypin/install-crystal@v1 | |
- name: Install Crystal libs | |
run: shards install | |
- name: Compile miniaudiohelpers.o | |
run: gcc -c -fPIC lib/raylib-cr/rsrc/miniaudio-tests/miniaudiohelpers.c -o lib/raylib-cr/rsrc/miniaudio-tests/miniaudiohelpers.o | |
- name: Compile libminiaudiohelpers.so | |
run: sudo gcc lib/raylib-cr/rsrc/miniaudio-tests/miniaudiohelpers.o -shared -o /usr/local/lib/libminiaudiohelpers.so -lm | |
- name: Install miniaudiohelpers 1 | |
run: sudo cp /usr/local/lib/libminiaudiohelpers.so /usr/lib/libminiaudiohelpers.so | |
- name: Install miniaudiohelpers 2 | |
run: sudo ln -s /usr/lib/libminiaudiohelpers.so /lib/miniaudiohelpers.so | |
- name: Install raylib | |
run: git clone https://github.com/raysan5/raylib | |
- name: mk build dir | |
run: mkdir raylib/build | |
- name: install raylib deps | |
run: sudo apt install libasound2-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev libxcursor-dev libxinerama-dev | |
- name: cmake 1 | |
run: cmake raylib -DBUILD_SHARED_LIBS=ON -B raylib/build | |
- name: cmake 2 | |
run: cmake --build raylib/build | |
- name: make install raylib | |
run: sudo make install -C raylib/build | |
- name: Install raylib 1 | |
run: sudo cp /usr/local/lib/libraylib.so.4.5.0 /usr/lib/libraylib.so.450 | |
- name: Install raylib 2 | |
run: sudo ln -s /usr/lib/libraylib.so.450 /lib/raylib.so | |
- name: Build site | |
run: crystal docs | |
- name: Deploy docs | |
uses: crazy-max/ghaction-github-pages@v1.2.5 | |
with: | |
target_branch: gh-pages | |
build_dir: docs | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |