-
Notifications
You must be signed in to change notification settings - Fork 6
52 lines (49 loc) · 1.57 KB
/
upload.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Upload latest documentation
on:
workflow_dispatch:
pull_request: # to comment on merge
branches:
- master
env:
HF_RAG_REPO: The-OpenROAD-Project/test_repo # To replace with ORAssistant_RAG_Dataset
OR_COMMIT_HASH: ffc5760f2df639cd184c40ceba253c7e02a006d5
ORFS_COMMIT_HASH: b94834df01cb58915bc0e8dabf85a314fbd8fb9e
OPENSTA_COMMIT_HASH: 1c7f022cd0a02ce71d047aa3dbb64e924b6efbd5
jobs:
or-manpages:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up prerequisites
run: |
sudo apt-get update
sudo apt-get install -y make pandoc git
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install huggingface CLI
run: |
pip install huggingface_hub[cli] python-dotenv beautifulsoup4
- name: Populate environment variables
working-directory: ./backend
run: |
rm -f .env && touch .env
echo "OR_REPO_COMMIT=$OR_COMMIT_HASH" >> .env
echo "ORFS_REPO_COMMIT=$ORFS_COMMIT_HASH" >> .env
echo "OPENSTA_REPO_COMMIT=$OPENSTA_COMMIT_HASH" >> .env
- name: Preprocess docs
working-directory: ./backend
run: |
python build_docs.py
- name: Login to Huggingface
run: |
huggingface-cli login --token ${{ secrets.HF_TOKEN }}
- name: Upload files
working-directory: ./backend
run: |
huggingface-cli upload ${{ env.HF_RAG_REPO }} ./data / --repo-type dataset
- name: Logout from Huggingface
run: |
huggingface-cli logout