upd #8
This file contains hidden or 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: Build | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| workflow_dispatch: | |
| inputs: | |
| logLevel: | |
| description: 'Log level' | |
| required: true | |
| default: 'warning' | |
| type: choice | |
| options: | |
| - info | |
| - warning | |
| - debug | |
| tags: | |
| description: 'Build' | |
| required: false | |
| type: boolean | |
| environment: | |
| description: 'Environment to run tests against' | |
| type: environment | |
| required: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install mdbook | |
| run: | | |
| mkdir bin | |
| curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.49/mdbook-v0.4.49-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin | |
| - name: Build reference portal | |
| run: bin/mdbook build | |
| - name: Git commit report | |
| run: | | |
| mv -f book/* . | |
| rm -rf book | |
| # Git commit | |
| git config --global user.name 'hydroperx' | |
| git config --global user.email 'hydroperfox@gmail.com' | |
| git switch -C ghpages | |
| git rm -r .github src .gitignore book.toml | |
| git add . | |
| git commit -m "Automated report" | |
| git push origin -f ghpages |