Skip to content

Commit

Permalink
ci.yml: expanded path to docs, added as env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeGat committed Sep 17, 2024
1 parent db99e67 commit d2a6b42
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ on:
- 'release-*'
paths:
- 'metadata.yaml'

env:
# NOTE: This is also used in `jobs.pr.with.additional-artifact-content-paths` but we can't use `env` context in a `with` section.
PAYU_OUTPUT_DIR: archive/output000
jobs:
###########
# PR jobs #
Expand Down Expand Up @@ -64,7 +66,7 @@ jobs:
- name: Diff docs/
id: diff
run: |
mv ${{ env.ARTIFACT_LOCAL_LOCATION }}/output000/* ./docs
mv ${{ env.ARTIFACT_LOCAL_LOCATION }}/${{ env.PAYU_OUTPUT_DIR }}/* ./docs
git add .
if git diff --cached --exit-code ./docs; then
echo "::warning::Modification to 'docs/', need to commit with '!update docs'"
Expand All @@ -80,7 +82,7 @@ jobs:
with:
pr: ${{ github.event.issue.number }}
comment: |
The `docs` in ${{ env.REPO_TARGET_DOCS_URL }} differ from ${{ env.REPO_SOURCE_ARTIFACT_URL }} (in directory `output000`).
The `docs` in ${{ env.REPO_TARGET_DOCS_URL }} differ from ${{ env.REPO_SOURCE_ARTIFACT_URL }} (in directory `${{ env.PAYU_OUTPUT_DIR }}`).
Comment `!update_docs` if you want these changes committed.
Expand Down Expand Up @@ -148,7 +150,7 @@ jobs:
env:
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
mv ${{ env.ARTIFACT_LOCAL_LOCATION }}/output000/* ./docs
mv ${{ env.ARTIFACT_LOCAL_LOCATION }}/${{ env.PAYU_OUTPUT_DIR }}/* ./docs
git add .
git commit -m "Updated docs as part of ${{ env.RUN_URL }}"
git push
Expand Down

0 comments on commit d2a6b42

Please sign in to comment.