Skip to content

Commit

Permalink
shallow clone cloudflare repo while deploying
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 18, 2024
1 parent 6cae73b commit c447b7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
user_email: 'github-actions[bot]@users.noreply.github.com'

- name: Deploy on cloudflare
if: "!${{ github.event_name == 'schedule' }}"
if: ${{ github.event_name != 'schedule' }}
run: |
sed -i 's|^const site_url\ =.*|const site_url\ =\ "https://pranab.pages.dev";|I' docusaurus.config.js
npm run build
Expand All @@ -46,7 +46,7 @@ jobs:
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git config --global credential.helper cache
git clone --branch cf-pages https://${{ secrets.CLOUDFLARE_DEPLOY_KEY }}@github.com/${{ github.repository_owner }}/${{ secrets.CLOUDFLARE_REPO_NAME }}
git clone --branch cf-pages --depth 1 https://${{ secrets.CLOUDFLARE_DEPLOY_KEY }}@github.com/${{ github.repository_owner }}/${{ secrets.CLOUDFLARE_REPO_NAME }}
cd ${{ secrets.CLOUDFLARE_REPO_NAME }}
rsync -azh --exclude .git --delete ../${{ github.event.repository.name }}/build/ ${{ github.event.repository.name }}
git add --all
Expand Down

0 comments on commit c447b7a

Please sign in to comment.