docs build and branch #93
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: docs-build-branch | |
run-name: docs build and branch | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- 'Shaders/**.fuse' | |
- 'Shaders/**.png' | |
- 'Shaders/**.sfi' | |
- 'Shaders/**.md' | |
- 'mkdocs.yml' | |
# https://stackoverflow.com/questions/58933155/manual-workflow-triggers-in-github-actions | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
env: | |
CI_COMMIT_AUTHOR: nmbr73 | |
CI_COMMIT_EMAIL: [email protected] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Lua | |
uses: leafo/gh-actions-lua@v9 | |
- name: Configure Git | |
run: | | |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" | |
git config --global user.email "${{ env.CI_COMMIT_EMAIL }}" | |
- name: Create User-Config | |
run: | | |
echo -e "local user_config = { pathToRepository = [[/home/runner/work/Shaderfuse/Shaderfuse/]] }\nreturn user_config\n" > Tools/Modules/Lua/Shaderfuse/~user_config.lua | |
- name: Run the Build-Script | |
run: | | |
chmod +x build.sh | |
./build.sh docs | |
# - name: Commit build artifacts | |
# # if: github.event_name == 'push' | |
# run: | | |
# git fetch | |
# git add Shaders.csv | |
# git commit -m "Update Shaders CSV file" || echo "Nothing to commit CSV" | |
# git push | |
- name: Setup a v3.x Python (for MkDocs) | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.x | |
- name: Install MkDocs and PlugIns | |
run: | | |
pip install mkdocs-material | |
pip install mkdocs-callouts | |
pip install mkdocs-awesome-pages-plugin | |
- name: Run MkDocs to deploy content | |
run: | | |
mkdocs gh-deploy --force |