Update Command Manual #45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Command Manual | |
permissions: | |
contents: read | |
on: | |
workflow_dispatch: | |
inputs: | |
release_tag: | |
description: "Ockam release tag, e.g. v0.112.0" | |
required: true | |
release_branch: | |
description: "New branch to update manuals" | |
required: true | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
update_manual: | |
name: Release - update command manual | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: write | |
steps: | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@3ebd1aebb47f95493b62de6eec0cac3cd74e50a9 | |
- name: Checkout To The Ockam Documentation Repository | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
with: | |
path: ockam-documentation | |
fetch-depth: 0 | |
- name: Checkout To The Ockam Repository So That We Can Have Access To The Nix Files | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
with: | |
repository: build-trust/ockam | |
path: ockam | |
- name: Update Ockam Command Manual | |
working-directory: ockam-documentation | |
shell: nix develop ./../ockam/tools/nix#rust --command bash {0} | |
run: | | |
git checkout command | |
git checkout -B "manual_${{ github.event.inputs.release_branch }}" | |
cd manual/template/mdbook | |
nix shell nixpkgs/nixos-23.11#mdbook --command sh -c "./build.sh ${{ github.event.inputs.release_tag }}" | |
- name: Push Upstream | |
working-directory: ockam-documentation | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -m "update command manual to ${{ github.event.inputs.release_tag }}" | |
git push --set-upstream origin "manual_${{ github.event.inputs.release_branch }}" |