-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Caching from one job to another was slowing things down a lot
- Loading branch information
1 parent
f08461a
commit fc89703
Showing
1 changed file
with
2 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ on: | |
branches: | ||
- master | ||
jobs: | ||
bundle-build-test: | ||
bundle-build-test-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
|
@@ -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: | ||
|
@@ -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 }} |