-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dependabot/pip/certifi-2024.7.4
- Loading branch information
Showing
1 changed file
with
21 additions
and
7 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 |
---|---|---|
|
@@ -59,6 +59,7 @@ jobs: | |
- uses: actions/[email protected] | ||
with: | ||
submodules: 'true' | ||
fetch-depth: 0 | ||
- name: Install poetry | ||
run: python3 -m pip install --upgrade pip && python3 -m pip install poetry | ||
- uses: actions/[email protected] | ||
|
@@ -94,17 +95,30 @@ jobs: | |
yarn install --frozen-lockfile | ||
yarn build | ||
cp -r ../build/html build/api | ||
- name: Fetch existing gh-pages branch | ||
if: needs.check_release.outputs.is_release != 'true' | ||
- name: Prepare github_pages branch | ||
run: | | ||
git fetch origin github_pages:github_pages | ||
git config --global user.name 'GitHub Actions' | ||
git config --global user.email '[email protected]' | ||
git fetch origin github_pages:github_pages || git checkout --orphan github_pages | ||
git checkout github_pages | ||
git checkout ${{ github.sha }} -- docs/cyclops-webpage/build | ||
git checkout github_pages -- docs/cyclops-webpage/build/api/*.html | ||
git checkout ${{ github.sha }} | ||
git rm -rf . | ||
git clean -fxd | ||
- name: Copy built files | ||
run: | | ||
cp -R docs/cyclops-webpage/build/* . | ||
if [[ "${{ needs.check_release.outputs.is_release }}" != "true" ]]; then | ||
mkdir -p docs/cyclops-webpage/build/api | ||
git checkout github_pages -- docs/cyclops-webpage/build/api/*.html || true | ||
fi | ||
- name: Commit and push to github_pages | ||
run: | | ||
git add . | ||
git commit -m "Update documentation" || echo "No changes to commit" | ||
git push -f origin github_pages | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_branch: github_pages | ||
publish_dir: docs/cyclops-webpage/build | ||
publish_dir: . | ||
keep_files: ${{ needs.check_release.outputs.is_release != 'true' }} |