Skip to content

cargo dist init

cargo dist init #57

Workflow file for this run

name: Deploy Doc
on:
schedule:
- cron: '0 0 * * *'
push:
branches: [ main, feat/* ]
env:
RUST_LOG: info
CARGO_TERM_COLOR: always
TAG_REPOS_DEFAULT: cache-v8.redb
DOCS_URL: ${{ vars.DOCS_URL }}
OS_CHECKER_CONFIGS: repos-default.json repos-ui.json repos.json
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: dtolnay/rust-toolchain@nightly
- name: Set up author & committer
run: |
git config --global user.name "zjp-CN[bot]"
git config --global user.email "zjp-CN[bot]@users.noreply.github.com"
git lfs install --skip-smudge # 如果 lfs 下载不了大文件,跳过下载
- name: Install os-checker
run: |
wget https://github.com/os-checker/database/releases/download/${{ env.TAG_REPOS_DEFAULT }}/repos-default.json
wget https://raw.githubusercontent.com/os-checker/os-checker/refs/heads/main/assets/repos-ui.json
jq "map({(.):{}}) | add" list-test.json > repos.json
# jq 'del(."qclic/e1000e-frame") | to_entries | map(.key) + ["os-checker/os-checker"]' repos-default.json > list.json
wget https://github.com/os-checker/database/releases/download/precompiled-checkers/os-checker -O ~/.cargo/bin/os-checker
chmod +x ~/.cargo/bin/os-checker
os-checker config --list-repos
- name: Generate rustdoc artifacts
run: |
cargo r #-- list-test.json
- name: Upload static files as artifact
id: deployment
uses: actions/upload-pages-artifact@v3
with:
path: deploy/
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4