Skip to content

Commit

Permalink
Address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
keirthana committed Oct 3, 2024
1 parent b4b16c2 commit 80212c1
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/generate-command-reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,35 @@ jobs:
channel: ${{ steps.base_version.outputs.value }}/stable
- name: Checkout repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Delete existing files - amc reference
run: rm -rf $AMC_COMMAND_REFERENCE_DIR/*
# Remove existing files, generate AMC command reference
- name: Generate AMC command reference documentation
run: amc generate documentation -f markdown -d $AMC_COMMAND_REFERENCE_DIR
- name: Set $AMC_COMMAND_REFERENCE_DIR as an output
run: echo "value=$AMC_COMMAND_REFERENCE_DIR" >> "$GITHUB_OUTPUT"
id: amc_command_reference_dir
run: |
set -e
rm -rf $AMC_COMMAND_REFERENCE_DIR/*
amc generate documentation -f markdown -d $AMC_COMMAND_REFERENCE_DIR
- name: Commit changes
if: ${{ github.ref == 'refs/heads/main' }}
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
with:
default_author: github_actions
message: 'Generate AMC command reference documentation'
add: ${{ steps.amc_command_reference_dir.outputs.value }}
- name: Delete existing files - appliance reference
run: rm -rf $APPLIANCE_COMMAND_REFERENCE_DIR/*
add: ${{ env.AMC_COMMAND_REFERENCE_DIR }}
# Remove existing files, generate appliance command reference
- name: Generate appliance command reference documentation
env:
SNAP_DOCS_DIR: "/var/snap/anbox-cloud-appliance/common/docs"
# For the appliance command, the files have to be generated inside the Snap
# and then copied to the desired directory because of Snap confinement
run: |
SNAP_DOCS_DIR="/var/snap/anbox-cloud-appliance/common/docs" && \
sudo mkdir -p $SNAP_DOCS_DIR && \
sudo anbox-cloud-appliance generate documentation -f markdown -d $SNAP_DOCS_DIR && \
set -e
rm -rf $APPLIANCE_COMMAND_REFERENCE_DIR/*
sudo mkdir -p $SNAP_DOCS_DIR
sudo anbox-cloud-appliance generate documentation -f markdown -d $SNAP_DOCS_DIR
cp -r $SNAP_DOCS_DIR/* $APPLIANCE_COMMAND_REFERENCE_DIR
- name: Set $APPLIANCE_COMMAND_REFERENCE_DIR as an output
run: echo "value=$APPLIANCE_COMMAND_REFERENCE_DIR" >> "$GITHUB_OUTPUT"
id: appliance_command_reference_dir
- name: Commit changes
if: ${{ github.ref == 'refs/heads/main' }}
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
with:
default_author: github_actions
message: 'Generate appliance command reference documentation'
add: ${{ steps.appliance_command_reference_dir.outputs.value }}
add: ${{ env.APPLIANCE_COMMAND_REFERENCE_DIR }}

0 comments on commit 80212c1

Please sign in to comment.