Skip to content

Commit

Permalink
TRIVIAL: update preview to local only
Browse files Browse the repository at this point in the history
  • Loading branch information
Mara3l committed Apr 17, 2024
1 parent f762e49 commit eebf007
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
16 changes: 0 additions & 16 deletions .github/actions/hugo-build-action/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ inputs:
required: false
description: Environment variable
default: public
keep-master:
required: false
description: Preview of the master branch
default: no
fetch-from:
required: false
description: repo to fetch the versions from
Expand All @@ -31,11 +27,6 @@ runs:
python-version-file: ".python-version"
cache: 'pip'
cache-dependency-path: scripts/script-requirements.txt
- name: Install Dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install -r scripts/script-requirements.txt
- uses: actions/setup-go@v4
with:
go-version: '>=1.20.1'
Expand All @@ -53,17 +44,10 @@ runs:
hugo-version: '0.110.0'
- name: "Build"
env:
KEEP_MASTER: ${{ inputs.keep-master }}
THIS_BRANCH: ${{ inputs.this-branch }}
BASE_URL: ${{ inputs.base-url }}
HUGO_ENV: production
shell: bash
run: |
cd docs
rm -f generate.sh
wget https://raw.githubusercontent.com/gooddata/gooddata-python-sdk/master/scripts/generate.sh
chmod +x ./generate.sh
./generate.sh ${{ inputs.fetch-from }} master ${{ inputs.keep-master}}
npm install
hugo version
hugo --minify ${BASE_URL:+--baseURL $BASE_URL}
34 changes: 26 additions & 8 deletions .github/actions/hugo-build-versioned-action/action.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Hugo Versioned Build
description: Builds documentation using Hugo
description: Builds versioned documentation using Hugo
inputs:
base-url:
required: false
Expand All @@ -24,6 +24,7 @@ inputs:
runs:
using: "composite"
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
Expand All @@ -35,17 +36,34 @@ runs:
run: |
python -m pip install --upgrade pip
pip install -r scripts/script-requirements.txt
- name: Generate Versioned Documentation
- uses: actions/setup-go@v4
with:
go-version: '>=1.20.1'
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
working-directory: ${{ inputs.working-directory }}
run: npm ci
shell: bash
- name: "Setup Hugo"
uses: peaceiris/actions-hugo@v2
with:
extended: true
hugo-version: '0.110.0'
- name: "Build"
env:
KEEP_MASTER: ${{ inputs.keep-master }}
THIS_BRANCH: ${{ inputs.this-branch }}
BASE_URL: ${{ inputs.base-url }}
HUGO_ENV: production
shell: bash
run: |
cd docs
rm -f generate.sh
wget https://raw.githubusercontent.com/gooddata/gooddata-python-sdk/master/scripts/generate.sh
chmod +x ./generate.sh
./generate.sh ${{ inputs.fetch-from }} master ${{ inputs.keep-master}}
- name: Hugo Build
uses: gooddata/gooddata-python-sdk/.github/actions/hugo-build-action@master
with:
hugo-env: ${{ inputs.hugo-env }}
working-directory: ${{ inputs.working-directory }}
base-url: ${{ inputs.base-url }}
npm install
hugo version
hugo --minify ${BASE_URL:+--baseURL $BASE_URL}
4 changes: 1 addition & 3 deletions .github/workflows/netlify-deploy-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ jobs:
run: |
rsync --delete -av PR-tmp/docs/content/en/ docs/content/en/
rm -rf PR-tmp
- name: Generate Versioned Docs
- name: Generate Docs
uses: gooddata/gooddata-python-sdk/.github/actions/hugo-build-action@master
with:
base-url: https://preview-${{ env.GITHUB_PR_NUMBER }}--${{ env.NETLIFY_SITE_NAME }}.netlify.app
keep-master: keep_master
fetch-from: upstream
- name: Publish
uses: netlify/actions/cli@master
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/netlify-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
with:
submodules: recursive
- name: Hugo Build
uses: gooddata/gooddata-python-sdk/.github/actions/hugo-build-action@master
uses: gooddata/gooddata-python-sdk/.github/actions/hugo-build-versioned-action@master
with:
base-url: https://www.gooddata.com/docs/python-sdk
- name: Publish
Expand Down

0 comments on commit eebf007

Please sign in to comment.