fixup! [ci] Better caching via a new cache key in publish-ghpages #118
Workflow file for this run
This file contains hidden or 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
name: publish-ghpages | |
on: | |
push: | |
branches: | |
- main | |
- ci | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Cache Sbt packages with different key | |
uses: actions/cache@v4 | |
with: | |
path: | | |
**/*.sbt | |
**/project/build.properties | |
**/project/**.scala | |
**/project/**.sbt | |
key: sbt-site-${{ hashFiles('**/*.sbt','**/project/build.properties','**/project/**.scala','**/project/**.sbt') }} | |
restore-keys: | | |
sbt-site- | |
setup-java-Linux-sbt-${{ hashFiles('**/*.sbt','**/project/build.properties','**/project/**.scala','**/project/**.sbt') }} | |
setup-java-Linux-sbt- | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
- name: Build site | |
run: sbt webStage | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: './target/web/stage' | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |