Skip to content

Commit

Permalink
Simplify workflow file
Browse files Browse the repository at this point in the history
Caching from one job to another was slowing things down a lot
  • Loading branch information
janosrusiczki authored Oct 4, 2024
1 parent f08461a commit fc89703
Showing 1 changed file with 2 additions and 25 deletions.
27 changes: 2 additions & 25 deletions .github/workflows/jekyll-build-test-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
branches:
- master
jobs:
bundle-build-test:
bundle-build-test-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
Expand All @@ -17,22 +17,6 @@ jobs:
run: bundle exec jekyll build
- name: Test site
run: bundle exec rake test
- name: Cache site
id: cache-site
uses: actions/cache@v3
with:
path: _site
key: site-sha-${{ github.sha }}
deploy:
runs-on: ubuntu-latest
needs: bundle-build-test
steps:
- name: Restore cache
id: cache-site
uses: actions/cache@v3
with:
path: _site
key: site-sha-${{ github.sha }}
- name: Deploy with rsync
uses: burnett01/[email protected]
with:
Expand All @@ -41,11 +25,4 @@ jobs:
remote_path: ${{ secrets.DEPLOY_PATH }}
remote_host: ${{ secrets.DEPLOY_HOST }}
remote_user: ${{ secrets.DEPLOY_USER }}
remote_key: ${{ secrets.DEPLOY_KEY }}
- name: Delete cache
run: |
curl -s \
-X DELETE \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer ${{ secrets.PAT_ACTIONS }}" \
https://api.github.com/repos/${{ github.repository }}/actions/caches?key=site-sha-${{ github.sha }}
remote_key: ${{ secrets.DEPLOY_KEY }}

0 comments on commit fc89703

Please sign in to comment.