Skip to content

update manage_child_processes.md #284

update manage_child_processes.md

update manage_child_processes.md #284

Workflow file for this run

name: Deploy mdBook site to Pages and Create Release
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# TODO: reenable tests
#test:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repo
# uses: actions/checkout@v2
# - name: Set up nvm, node, npm p0
# run: |
# echo "$HOME" >> $GITHUB_PATH
# echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV
# - name: Set up nvm, node, npm p1
# run: |
# source $NVM_DIR/nvm.sh
# nvm install 20.0.0
# nvm --version
# - name: Set up cargo
# run: |
# curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh
# rustup update
# cargo install wasm-tools
# rustup install nightly
# rustup target add wasm32-wasip1 --toolchain nightly
# cargo install cargo-wasi
# - name: Get latest release from foundry-rs/foundry
# id: get-latest-foundry-release
# uses: actions/github-script@v6
# with:
# script: |
# const repo = {
# owner: 'foundry-rs',
# repo: 'foundry',
# per_page: 1,
# page: 1,
# };
# const releases = await github.rest.repos.listReleases(repo);
# const preReleases = releases.data.filter(release => release.prerelease);
# // Sort pre-releases by created_at date in descending order
# preReleases.sort((a, b) => new Date(b.created_at) - new Date(a.created_at));
# if (preReleases.length === 0) {
# throw new Error('No pre-releases found');
# }
# const latestPreRelease = preReleases[0];
# const asset = latestPreRelease.assets.find(asset => asset.name.match(/foundry_nightly_linux_amd64\.tar\.gz/));
# if (!asset) {
# throw new Error('Asset not found');
# }
# return asset.browser_download_url;
# result-encoding: string
# - name: Get latest release from hyperware-ai/kit
# id: get-latest-kit-release
# uses: actions/github-script@v6
# with:
# script: |
# const repo = {
# owner: 'hyperware-ai',
# repo: 'kit',
# };
# const release = await github.rest.repos.getLatestRelease(repo);
# const asset = release.data.assets.find(asset => asset.name.match(/kit-x86_64-unknown-linux-gnu\.zip/));
# if (!asset) {
# throw new Error('Asset not found');
# }
# return asset.browser_download_url;
# result-encoding: string
# - name: Download the Kit release
# run: wget -q ${DOWNLOAD_URL} -O kit.zip
# env:
# DOWNLOAD_URL: ${{ steps.get-latest-kit-release.outputs.result }}
# - name: Unzip the release
# run: unzip kit.zip
# - name: Run Kit tests
# #run: ./kit t code/tests.toml
# run: |
# { ./kit t code/tests.toml; } 2>&1
build:
#needs: test # TODO: reenable tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install mdBook
run: |
cargo install --git https://github.com/nick1udwig/mdBook --branch hf/output-single-md-file --locked mdbook
cargo install mdbook-linkcheck
cargo install mdbook-webinclude
cargo install --git https://github.com/nick1udwig/mdbook-hide-feature --locked
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
- name: Build with mdBook
run: mdbook build
- name: Upload artifact for deployment
uses: actions/upload-pages-artifact@v3
with:
path: ./book/html
- name: Archive built site
run: tar -czf book.tar.gz -C book/html .
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.run_number }}
release_name: Release ${{ github.run_number }}
draft: false
prerelease: false
- name: Upload Release Asset (.tar.gz)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./book.tar.gz
asset_name: book.tar.gz
asset_content_type: application/gzip
- name: Upload Release Asset (.md)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./book/single-file/book.md
asset_name: book.md
asset_content_type: text/markdown
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4