Skip to content

Commit

Permalink
test script
Browse files Browse the repository at this point in the history
  • Loading branch information
robbymilo committed Dec 4, 2024
1 parent 9ba9fb2 commit c712b83
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
15 changes: 1 addition & 14 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,24 +95,11 @@ jobs:
ls -al
ls -al ${{ inputs.source_directory }}
- name: Create _index file
id: create-index
if: inputs.index_file == true
shell: bash
run: |
create_index_command=$("echo -e '---\\nredirectURL:\\s\/docs/${{ inputs.repo }}/latest/\\ntype:\\sredirect\\nversioned:\\strue\\n---\\n' > content/docs/${{ inputs.repo }}/_index.md &&")
echo "create_index_command=$create_index_command" >> $GITHUB_OUTPUT
- name: Build website
if: github.event.action == 'opened' || github.event.action == 'synchronize'
shell: bash
run: |
docker run \
-v "${PWD}/dist:/hugo/dist" \
-v "${PWD}/${{ inputs.source_directory }}:/hugo/${{ inputs.website_directory }}" \
--rm grafana/docs-base:latest \
/bin/bash \
-c '${{ steps.create-index.outputs.create_index_command }}HUGO_SSI=false hugo --environment=docs --destination=dist/ --baseURL= --minify'
./deploy-preview/build.sh
- name: Print build header value
if: github.event.action == 'opened' || github.event.action == 'synchronize'
Expand Down
8 changes: 8 additions & 0 deletions deploy-preview/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

docker run \
-v "${PWD}/dist:/hugo/dist" \
-v "${PWD}/${{ inputs.source_directory }}:/hugo/${{ inputs.website_directory }}" \
--rm grafana/docs-base:latest \
/bin/bash \
-c 'HUGO_SSI=false hugo --environment=docs --destination=dist/ --baseURL= --minify'

0 comments on commit c712b83

Please sign in to comment.