Skip to content

Fix test_create_with_invalid_url #242

Fix test_create_with_invalid_url

Fix test_create_with_invalid_url #242

name: GH-Pages-Push
on:
push:
branches:
- main
paths:
- docs/**
- cypress/**
- harvester_e2e_tests/**
- .github/workflows/**
jobs:
gh-pages:
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.8]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch gh-pages branch
run: |
git fetch --depth=1 origin gh-pages
- name: Install Hugo
run: |
# Adapted from https://gist.github.com/steinwaywhw/a4cd19cda655b8249d908261a62687f8
curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | \
grep -E 'browser_download_url.*hugo_[0-9]+.*Linux-64bit.tar.gz' | \
cut -d : -f 2,3 | \
tr -d \" | \
xargs -n 1 curl -Lo hugo.tar.gz
tar -xf hugo.tar.gz -C /usr/local/bin/ hugo
- name: Run Hugo
run: |
hugo
working-directory: ./docs/
- name: install requirements
run: |
pip install -r test-requirements.txt
- name: Run pdoc3
run: |
pdoc --html -o . .
mv harvester_e2e_tests/ ../docs/public/backend
working-directory: ./harvester_e2e_tests
- name: install typedoc
run: |
npm install
working-directory: ./cypress/
- name: run typedoc
run: |
./node_modules/.bin/typedoc --options ./typedoc.json
mv docs/ ../docs/public/integration
working-directory: ./cypress/
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Deploy new test docs
run: |
# Adapted from https://github.com/helm/chart-releaser-action/blob/master/cr.sh
gh_pages_worktree=$(mktemp -d)
git worktree add "$gh_pages_worktree" gh-pages
pushd "$gh_pages_worktree" > /dev/null
git rm -r --ignore-unmatch .
popd > /dev/null
mv docs/public/* "$gh_pages_worktree"
touch ${gh_pages_worktree}/.nojekyll
pushd "$gh_pages_worktree" > /dev/null
git add .
# Only commit files if changes are detected
git diff-index --quiet HEAD || git commit --message="Update testing docs" --signoff
git push origin gh-pages
popd > /dev/null
git worktree remove "$gh_pages_worktree"