-
Notifications
You must be signed in to change notification settings - Fork 27.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Doc new front github actions (#14512)
* Doc new front github actions * Fix docstring * Fix feature extraction utils import (#14515) * Address Julien's comments * Push to doc-builder * Ready for merge
- Loading branch information
1 parent
765f6a4
commit de3d874
Showing
3 changed files
with
63 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Build documentation | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build_and_package: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
repository: 'huggingface/doc-builder' | ||
token: ${{ secrets.HUGGINGFACE_PUSH }} | ||
|
||
- name: Clone transformers | ||
run: | | ||
git clone https://github.com/huggingface/transformers | ||
- name: Setup environment | ||
run: | | ||
sudo apt-get -y update && sudo apt-get install -y libsndfile1-dev | ||
pip install -e . | ||
pip install git+https://github.com/huggingface/transformers#egg=transformers[dev] | ||
export TORCH_VERSION=$(python -c "from torch import version; print(version.__version__.split('+')[0])") | ||
pip install torch-scatter -f https://data.pyg.org/whl/torch-${TORCH_VERSION}+cpu.html | ||
pip install torchvision | ||
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git' | ||
sudo apt install tesseract-ocr | ||
pip install pytesseract | ||
pip install pytorch-quantization --extra-index-url https://pypi.ngc.nvidia.com | ||
- name: Setup git | ||
run: | | ||
git config --global user.name "Hugging Face" | ||
git config --global user.email transformers@huggingface.co | ||
- name: Make documentation | ||
run: | | ||
python src/build.py transformers ./transformers/docs/source | ||
- name: Push to repository | ||
run: | | ||
git add build | ||
git commit -m "Updated with commit ${{ github.sha }}" | ||
git push origin main | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters