Download .github/workflows/update-docs.yml from eporath/TestSpace: direct link, hf CLI and curl.
- Browser
- Download file 1.99 kB
-
https://huggingface.co/spaces/eporath/TestSpace/resolve/main/.github/workflows/update-docs.yml
- Command line
-
hf download hf://spaces/eporath/TestSpace/.github/workflows/update-docs.yml
-
curl -L -o update-docs.yml https://huggingface.co/spaces/eporath/TestSpace/resolve/main/.github/workflows/update-docs.yml
1.99 kB
| name: Export Superset Tables and Create PR | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - issue-5-superset-token-cache | |
| workflow_dispatch: | |
| jobs: | |
| export-and-pr: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install . | |
| pip install networkx pyvis | |
| - name: Run export commands | |
| run: | | |
| python -m scribe_python_client.cli --api-call get-dataset-tables-dict --env dev --username "${{ secrets.SUPERSET_USERNAME }}" --password "${{ secrets.SUPERSET_PASSWORD }}" | |
| python -m scribe_python_client.cli --api-call get-dataset-tables-md --env dev --username "${{ secrets.SUPERSET_USERNAME }}" --password "${{ secrets.SUPERSET_PASSWORD }}" | |
| - name: Bump version | |
| run: | | |
| VERSION_FILE="scribe_python_client/version.py" | |
| OLD_VERSION=$(grep '__version__' $VERSION_FILE | cut -d '"' -f2) | |
| NEW_VERSION=$(echo $OLD_VERSION | awk -F. -v OFS=. '{$NF += 1 ; print}') | |
| echo "__version__ = \"$NEW_VERSION\"" > $VERSION_FILE | |
| echo "Bumped version from $OLD_VERSION to $NEW_VERSION" | |
| - name: Create PR | |
| uses: peter-evans/create-pull-request@v5 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: "Automated update of Superset docs and version bump" | |
| title: "Update Superset Docs and Version" | |
| body: | | |
| This PR was automatically generated by a CI workflow. | |
| - Updates: `docs/dataset_tables.json` and `docs/dataset_tables.md` | |
| - Bumps the version in `scribe_python_client/version.py` | |
| branch: update-docs | |
| add-paths: | | |
| docs/* | |
| scribe_python_client/version.py | |