Skip to content

Commit

Permalink
Add docs archive checkout.
Browse files Browse the repository at this point in the history
  • Loading branch information
milos.colic committed Jan 15, 2024
1 parent 57c1c98 commit fa22eea
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ jobs:
documentation_path: docs/source
requirements_path: docs/docs-requirements.txt
- name: checkout v0.3.x archive
# Please do not change any step in here, even though it may look hacky
# This is the only way to emulate git archive --remote with actions/checkout
# git checkout gh-pages-v0.3.x is required to have a local branch for archiving
# git pull is optional, but it's a good practice to have the latest version
# git checkout gh-pages right after is required to go back to the working branch
# mkdir ./v0.3.x is required to create a directory for the archive
# git archive gh-pages-v0.3.x | tar -x -C ./v0.3.x is required to extract the archive
# in the right place
# git add --all is required to add the new files to the working branch
# git commit -am "Adding v0.3.x docs" is required to commit the changes
run: |
git checkout gh-pages-v0.3.x
git pull
Expand All @@ -35,7 +45,6 @@ jobs:
git archive gh-pages-v0.3.x | tar -x -C ./v0.3.x
git add --all
git commit -am "Adding v0.3.x docs"
ls -la
- name: Push changes
uses: ad-m/github-push-action@master
with:
Expand Down

0 comments on commit fa22eea

Please sign in to comment.