Skip to content

Latest commit

 

History

History
60 lines (45 loc) · 1.56 KB

README.md

File metadata and controls

60 lines (45 loc) · 1.56 KB

Margo GitHub Actions

Publishes a crate to a Margo registry inside GitHub Actions.

Quickstart with GitHub Pages

See the demo for a working example of the action.

Create a GitHub Pages branch

git checkout --orphan gh-pages
# Remove any existing files — this is destructive!
git reset
git clean -xfd

Initialize the Margo registry

# No need for Jekyll as we build all the files ourselves
touch .nojekyll
# Initialization
margo init . --base-url https://my-organization-name.github.io/my-repository-name/
# Commit and push the empty registry
git add .
git commit -m "Initialize Margo registry"
git push origin gh-pages

Add the action in your GitHub Actions configuration

jobs:
  build:
    steps:
      # Previous steps need to have built the crate via `cargo
      # package` and checked out the GitHub Pages branch.

     - name: Publish crate
        uses: integer32llc/margo-actions@main
        with:
          crates: /path/to/some.crate
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      # Subsequent steps need to commit the registry changes and push
      # them to the GitHub Pages branch.

Inputs

Input Default Description
crates N/A A glob expression for the crates to publish
registry '.' The path to the Margo registry directory