-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clean up workflow script and docs directory
- Loading branch information
Showing
5 changed files
with
132 additions
and
153 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,13 +1,130 @@ | ||
# name: Update docs | ||
# on: | ||
# push: | ||
# branches: | ||
# - master | ||
# tags: | ||
# - v* | ||
|
||
# jobs: | ||
# update-docs: | ||
# name: Update docs | ||
# uses: unifyai/workflows/.github/workflows/docs.yml@master | ||
# secrets: inherit | ||
name: Update docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- v* | ||
# workflow_call: | ||
# secrets: | ||
# SSH_GH_PAGES: | ||
# description: 'SSH key for GitHub Pages deployment' | ||
# required: true | ||
# inputs: | ||
# package-dependencies: | ||
# description: 'Apt package dependencies' | ||
# required: false | ||
# default: '' | ||
# type: string | ||
|
||
jobs: | ||
wait-for-others: | ||
name: Wait For Other Workflows To Complete | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Wait for other workflows | ||
uses: mktcode/consecutive-workflow-action@eb43c6b5852dd0e33efa797a1817196d06daa4b2 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
publish-dev-docs: | ||
name: Publish dev docs | ||
runs-on: ubuntu-latest | ||
needs: wait-for-others | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Quarto | ||
uses: quarto-dev/quarto-actions/setup@v2 | ||
|
||
- name: Install Python and Dependencies | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' | ||
- run: pip install -r requirements.txt | ||
|
||
- name: Render Docs | ||
uses: quarto-dev/quarto-actions/render@v2 | ||
with: | ||
to: html | ||
|
||
- name: Deploy to GitHub Pages | ||
uses: JamesIves/github-pages-deploy-action@v4.4.1 | ||
with: | ||
folder: docs | ||
target-folder: "${{ github.event.repository.name }}" | ||
ssh-key: ${{ secrets.SSH_GH_PAGES }} | ||
branch: master | ||
git-config-name: ivy-seed | ||
git-config-email: ivydl.team@gmail.com | ||
repository-name: unifyai/docs | ||
clean: true | ||
|
||
publish-release-docs: | ||
name: Publish release docs | ||
runs-on: ubuntu-latest | ||
needs: wait-for-others | ||
if: startsWith(github.ref, 'refs/tags') | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Quarto | ||
uses: quarto-dev/quarto-actions/setup@v2 | ||
|
||
- name: Install Python and Dependencies | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' | ||
- run: pip install -r requirements.txt | ||
|
||
- name: Render Docs | ||
uses: quarto-dev/quarto-actions/render@v2 | ||
with: | ||
to: html | ||
|
||
- name: Deploy to GitHub Pages | ||
uses: JamesIves/github-pages-deploy-action@v4.4.1 | ||
with: | ||
folder: docs | ||
target-folder: "${{ github.ref_name != 'dev' && format('{0}/', github.ref_name) || '' }}${{ github.event.repository.name }}" | ||
ssh-key: ${{ secrets.SSH_GH_PAGES }} | ||
branch: master | ||
git-config-name: ivy-seed | ||
git-config-email: ivydl.team@gmail.com | ||
repository-name: unifyai/docs | ||
clean: true | ||
|
||
update-versions: | ||
name: Update versions.json | ||
runs-on: ubuntu-latest | ||
needs: publish-release-docs | ||
steps: | ||
- name: Checkout 🛎️ Docs | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: unifyai/docs | ||
ssh-key: ${{ secrets.SSH_GH_PAGES }} | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.10 | ||
|
||
- name: Add version to ${{ github.event.repository.name }}.json | ||
run: | | ||
python versions/add_version.py ${{ github.event.repository.name }} ${{ github.ref_name }} | ||
- name: Commit and push | ||
run: | | ||
git config --global user.email "ivydl.team@gmail.com" | ||
git config --global user.name "ivy-seed" | ||
git add versions/ | ||
git commit -m "Add ${{ github.ref_name }} to ${{ github.event.repository.name }}.json" | ||
git push |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -16,4 +16,5 @@ autogenerated_source/ | |
*.json | ||
.DS_Store | ||
.quarto/ | ||
docs/ | ||
docs/ | ||
/.quarto/ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.