Skip to content

nim65s/docker-cargo-binstall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker images for cargo-binstall

You can either use eg. nim65s/cargo-binstall:mdbook to get a bookworm container with the right binary for your CI, or build your own with eg.:

FROM nim65s/cargo-binstall as builder

RUN cargo binstall -y mdbook

FROM debian:bookworm

COPY --from=builder /usr/local/cargo/bin/mdbook /usr/local/bin/mdbook

Currently available apps:

  • mdbook

Example deployment with Github Actions & Github Pages:

name: Build and Deploy book

on:
  push:
    branches:
      - main

jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    container:
      image: nim65s/cargo-binstall:mdbook
    steps:
      - name: Checkout 🛎️
        uses: actions/checkout@v4
      - name: Build ⚙️
        run: mdbook build
      - name: Deploy 🚀
        uses: JamesIves/github-pages-deploy-action@v4
        with:
          folder: book
        permissions:
          contents: write

Example deployment with Gitlab CI and rsync

image: nim65s/cargo-binstall:mdbook

build:
  stage: build
  script:
    - mdbook build
  artifacts:
    paths:
      - book

deploy:
  stage: deploy
  only:
    refs:
      - main@your-org/your-project
  before_script:
    - mkdir -p ~/.ssh
    - ssh-keyscan "your-hostname.tld" > ~/.ssh/known_hosts
    - chmod 700 ~/.ssh
    - chmod 600 ~/.ssh/known_hosts
    - eval $(ssh-agent -s)
    - echo "$SSH_DEPLOY_KEY" | ssh-add -
  script:
    - chmod -R a+rX,g+w book
    - chown -R your-uid:your-gid book
    - rsync -avzP --delete book/ your-user@your-hostname.tld:/where/you/want

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published