Building and deploying site... #7
Workflow file for this run
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: Site building and deploying | |
| run-name: Building and deploying site... | |
| on: | |
| "release" | |
| jobs: | |
| Building-And-Deploying-Site: | |
| runs-on: ubuntu-latest | |
| name: Site Building And Deploying | |
| env: | |
| github_sha: $GITHUB_SHA | |
| workspace: $GITHUB_WORKSPACE | |
| cache-name: stack-control-site | |
| steps: | |
| - name: Checkout master branch | |
| uses: actions/checkout@v4 | |
| with: | |
| path: main | |
| - name: Cache cargo packages | |
| uses: actions/cache@v4 | |
| with: | |
| key: ${{ runner.os }}-build-${{ env.cache-name }} | |
| path: | | |
| ~/.cargo | |
| ${{env.workspace}}/main/target | |
| - name: Generating documentation | |
| run: | | |
| cd ${{env.workspace}}/main/stack-control-site | |
| cargo run --manifest-path ../stack-control-doc/Cargo.toml -- ./resources/documentation.json | |
| - name: Building wasm | |
| run: | | |
| cd ${{env.workspace}}/main/stack-control-site | |
| cargo install wasm-pack | |
| wasm-pack build ../stack-control-wasm --out-dir ../stack-control-site/resources/stack-control-wasm-module | |
| - name: Building and installing | |
| run: | | |
| cd ${{env.workspace}}/main/stack-control-site | |
| npm install | |
| npm run build | |
| - name: Checkout gen-site | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: 'gen-site' | |
| path: site | |
| - name: Publishing site | |
| run: | | |
| cd ${{env.workspace}}/site | |
| cp -R ${{env.workspace}}/main/stack-control-site/dist/. ${{env.workspace}}/site | |
| git config --global user.name 'CREAsTIVE' | |
| git config --global user.email 'CREAsTIVE@users.noreply.github.com' | |
| git add . | |
| git commit -am "gen: site update for ${{env.github_sha}}" | |
| git push |