-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* docs: fixes script to publish docs
- Loading branch information
Showing
1 changed file
with
56 additions
and
55 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 |
---|---|---|
@@ -1,55 +1,56 @@ | ||
name: Generate Documentation | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
run_script: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install poetry | ||
run: pipx install poetry | ||
|
||
- name: Set up Python version | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
cache: 'poetry' | ||
|
||
- name: Install dependencies with Poetry | ||
run: poetry install --only docs --no-interaction | ||
|
||
- name: Generate tutorial docs | ||
run: | | ||
make build/docs | ||
- name: Switch to page Branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: pages | ||
clean: false | ||
|
||
- name: Configure Git User | ||
run: | | ||
git config user.name "${{ github.actor }}" | ||
git config user.email "${{ github.actor }}@users.noreply.github.com" | ||
- name: Add docs to git | ||
run: | | ||
mv site/* . | ||
git add . | ||
- name: Commit Changes | ||
run: | | ||
git commit -m "updated docs" | ||
git --no-pager log -p -2 | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: pages | ||
name: Generate Documentation | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
run_script: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install poetry | ||
run: pipx install poetry | ||
|
||
- name: Set up Python version | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
cache: 'poetry' | ||
|
||
- name: Install dependencies with Poetry | ||
run: poetry install --only docs --no-interaction | ||
|
||
- name: Generate tutorial docs | ||
run: | | ||
make build/docs | ||
- name: Switch to page Branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: pages | ||
clean: false | ||
|
||
- name: Configure Git User | ||
run: | | ||
git config user.name "${{ github.actor }}" | ||
git config user.email "${{ github.actor }}@users.noreply.github.com" | ||
- name: Add docs to git | ||
run: | | ||
cp -R site/* . | ||
rm -R site/ | ||
git add . | ||
- name: Commit Changes | ||
run: | | ||
git commit -m "updated docs" | ||
git --no-pager log -p -2 | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: pages |