Skip to content

Update getting_started.md with proper links #220

Update getting_started.md with proper links

Update getting_started.md with proper links #220

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:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Install 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-wasi
rustup target add wasm32-wasi --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: Download the Foundry release
run: wget -q ${DOWNLOAD_URL} -O foundry.tar.gz
env:
DOWNLOAD_URL: ${{ steps.get-latest-foundry-release.outputs.result }}
- name: Untar the release
run: tar zxf foundry.tar.gz
- name: Add Foundry to path
run: |
echo "$PWD" >> $GITHUB_PATH
echo "$PWD/anvil" >> $GITHUB_PATH
echo "$PWD/cast" >> $GITHUB_PATH
echo "$PWD/chisel" >> $GITHUB_PATH
echo "$PWD/forge" >> $GITHUB_PATH
- name: Get latest release from kinode-dao/kit
id: get-latest-kit-release
uses: actions/github-script@v6
with:
script: |
const repo = {
owner: 'kinode-dao',
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: |
pwd
echo $PATH
ls -l
which ls
which ./anvil
realpath ./anvil
which anvil
which cast
which chisel
which forge
./kit t code/tests.toml
build:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install mdBook
run: |
cargo install --git https://github.com/nick1udwig/mdBook --branch hf/dont-write-searchindex-json --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
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
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