Skip to content

Commit

Permalink
Caching the mkdoc installation
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfiex authored Dec 12, 2023
1 parent 66385e5 commit 19e7592
Showing 1 changed file with 12 additions and 33 deletions.
45 changes: 12 additions & 33 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ jobs:

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8 # Choose the Python version you need

- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/*.lock') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
Expand All @@ -29,36 +40,4 @@ jobs:
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
# git checkout -b production
# find . -type f ! -path './site*' ! -path './.*' -exec echo {} +
# find . -type f ! -path './site*' ! -path './.*' -exec rm -f {} +
# rm -rf docs
# mv site docs
# touch .nojekyll
# git add .
# git commit -m "Content update"
git fetch --all
# Check if there are any local changes
if [ -n "$(git status --porcelain)" ]; then
# If there are changes, commit them
git add .
git commit -m "Committing local changes before switching branches"
else
echo "No local changes to commit."
fi

git checkout production

# Remove files and directories from the production branch
git rm -r --ignore-unmatch */*

git checkout main -- site


# git mv site docs
git add -A
git commit -m "Content update"

git push
# Your existing script to force push to the documentation branch

0 comments on commit 19e7592

Please sign in to comment.