Skip to content

Update shader creation in tutorial (#182) #214

Update shader creation in tutorial (#182)

Update shader creation in tutorial (#182) #214

Workflow file for this run

name: Publish
on:
push:
branches:
- master
jobs:
publish-tutorial:
name: Publish - Tutorial
runs-on: ubuntu-latest
env:
RUST_LOG: info
RUST_VERSION: 1.51.0
MDBOOK_VERSION: 0.4.21
steps:
# Checkout
- name: Checkout Repository
uses: actions/checkout@v2
# Dependencies
- name: Install Java
uses: actions/setup-java@v1
with:
java-version: 14
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_VERSION }}
- name: Cache mdbook
id: cache-mdbook
uses: actions/cache@v2
with:
path: ~/.cargo/bin/mdbook
key: ${{ runner.os }}-${{ env.RUST_VERSION }}-${{ env.MDBOOK_VERSION }}
- name: Install mdbook
uses: actions-rs/cargo@v1
if: steps.cache-mdbook.outputs.cache-hit != 'true'
with:
command: install
args: mdbook --version ${{ env.MDBOOK_VERSION }} --no-default-features
# Publish
- name: Build Index
working-directory: ./generator
run: ./gradlew run --args="--directory=.. index"
- name: Cache Preprocessor
id: cache-preprocessor
uses: actions/cache@v2
with:
path: ~/.cargo/bin/vk-preprocessor
key: ${{ hashFiles('index.txt', 'tutorial/book/preprocessor/**') }}
- name: Build Preprocessor
uses: actions-rs/cargo@v1
if: steps.cache-preprocessor.outputs.cache-hit != 'true'
with:
command: install
args: --path ./tutorial/book/preprocessor
- name: Build Tutorial
working-directory: ./tutorial/book
run: mdbook build
- name: Publish Tutorial
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: ./tutorial/book/book
CLEAN: true