Skip to content

Commit fab273a

Browse files
committed
Simply using custom github upload and push
1 parent 9155e03 commit fab273a

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

.github/workflows/build_docs.yaml

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,16 @@ jobs:
3333
git config --global user.email "[email protected]"
3434
git config --global user.name "GitHub Actions"
3535
git checkout -b dist
36-
37-
# Remove all existing files except the .gitignore file
38-
find . -type f ! -path "./docs/*" ! -path "./.git/*" -exec git rm --cached {} +
39-
git checkout HEAD -- .gitignore
40-
41-
# Copy only the content of the HTML folder to the root of the repository
42-
cp -r docs/build/html/. .
43-
44-
# Remove the docs folder
45-
rm -rf docs
46-
47-
# Add all files in the root directory for commit
48-
git add .
49-
50-
# Commit and push changes
36+
git add -f docs/build/html
5137
git commit -m "Deploy Sphinx documentation to dist branch"
5238
git push origin dist
39+
40+
- name: Upload artifact
41+
uses: actions/upload-pages-artifact@v3
42+
with:
43+
# Upload entire repository
44+
path: 'docs/build/html'
45+
46+
- name: Deploy to GitHub Pages
47+
id: deployment
48+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)