Skip to content

Commit

Permalink
run deploy in separate job using cache
Browse files Browse the repository at this point in the history
  • Loading branch information
anoff committed Aug 22, 2022
1 parent 912d857 commit e822401
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/buildnrelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ jobs:
retention-days: 7

generate-page:
if: github.ref == 'refs/heads/source'
needs: build-cv
runs-on: ubuntu-20.04
container:
Expand All @@ -88,6 +87,20 @@ jobs:
run: hugo --gc --minify -d _site --baseURL "https://anoff.io"
- name: disable Jekyll
run: touch _site/.nojekyll
- uses: actions/cache@v3
with:
path: _site/
key: ${{ env.GITHUB_SHA }}-${{ env.GITHUB_RUN_ID }}-site

deploy-page:
if: github.ref == 'refs/heads/source'
needs: generate-page
runs-on: ubuntu-20.04
steps:
- uses: actions/cache@v3
with:
path: _site/
key: ${{ env.GITHUB_SHA }}-${{ env.GITHUB_RUN_ID }}-site
- name: Publish page
uses: JamesIves/github-pages-deploy-action@v4
with:
Expand Down

0 comments on commit e822401

Please sign in to comment.