Skip to content

Commit

Permalink
Merge pull request #34 from headlamp-k8s/link-docs-fix
Browse files Browse the repository at this point in the history
Link docs fix
  • Loading branch information
joaquimrocha authored Aug 8, 2024
2 parents cc0b8a9 + f6cdc20 commit 790bf03
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/azure-static-web-apps-white-bush-0475e2d03.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,21 @@ jobs:
path: headlamp
fetch-depth: 0

- name: Set HEADLAMP_DOCS environment variable
run: echo "HEADLAMP_DOCS=$(pwd)/headlamp/docs" >> $GITHUB_ENV

- uses: actions/checkout@v2
with:
path: headlamp-website
submodules: true

- name: Make typedoc for Headlamp
run: |
cd headlamp
make frontend-install
make docs
- name: Set HEADLAMP_DOCS environment variable
run: |
echo "HEADLAMP_DOCS=$(pwd)/headlamp/docs" >> $GITHUB_ENV
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
Expand All @@ -43,9 +51,11 @@ jobs:
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "/" # App source code path
app_location: "headlamp-website/" # App source code path
output_location: "build" # Built app content directory - optional
###### End of Repository/Build Configurations ######
env:
HEADLAMP_DOCS: ${{ env.HEADLAMP_DOCS }}

close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
Expand Down
4 changes: 3 additions & 1 deletion link-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ TARGET=${HEADLAMP_DOCS:-${1:-../headlamp/docs}}
TARGET_PATH=$(realpath "$TARGET")
LINK_PATH="./docs/latest"

mkdir -p $(dirname $LINK_PATH)

# Remove the existing link if it exists
if [ -L $LINK_PATH ]; then
echo "Not creating docs link, ./docs/latest already exists"
echo "Not creating docs link, already exists: ./docs/latest -> $(readlink -f $LINK_PATH)"
exit 0
fi

Expand Down

0 comments on commit 790bf03

Please sign in to comment.