Add posts breast-cancer-prediction #18
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
name: Deploy Hugo site to Pages | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
env: | |
HUGO_CACHEDIR: /tmp/hugo_cache # <- Define the env variable here, so that Hugo's cache dir is now predictible in your workflow and doesn't depend on the Hugo's version you're using. | |
permissions: | |
contents: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true # Fetch Hugo themes (true OR recursive) | |
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v3 | |
with: | |
hugo-version: "latest" | |
extended: true | |
- name: Cache Hugo resources | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.HUGO_CACHEDIR }} # <- Use the same env variable just right here | |
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-hugomod- | |
- name: Build | |
run: hugo --minify --gc | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v4 | |
if: github.ref == 'refs/heads/main' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public |