Skip to content

changes a bit the news item #547

changes a bit the news item

changes a bit the news item #547

Workflow file for this run

name: github pages
on:
push:
branches:
- source
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
defaults:
run:
shell: bash
jobs:
#
# Build
#
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.150.0
steps:
- name: Install Hugo
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Build with Hugo
env:
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
HUGO_ENVIRONMENT: production
run: |
hugo \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artefacts
uses: actions/upload-pages-artifact@v3
with:
path: ./public
#
# Deploy
#
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
- name: Webhook on failure
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: ${{ job.status }}
SLACK_ICON: https://github.com/github.png?size=48
SLACK_MESSAGE: 'Failed to deploy'
SLACK_TITLE: Fail!
SLACK_USERNAME: GitHub
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
# build-deploy:
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v3
# - name: Deploy
# uses: chabad360/hugo-gh-pages@master
# with:
# githubToken: ${{ secrets.DEPLOY_TOKEN }}
# cname: www.behavioral-ds.science
# branch: main
# hugoVersion: extended_0.150.0