Skip to content

Merge pull request #52 from uit-no/radovan/2024-survey #245

Merge pull request #52 from uit-no/radovan/2024-survey

Merge pull request #52 from uit-no/radovan/2024-survey #245

Workflow file for this run

name: Build/deploy website
env:
ZOLA_VERSION: "0.19.2"
CNAME: "research-software.uit.no"
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install zola
run: |
set -x
wget -O - \
"https://github.com/getzola/zola/releases/download/v${ZOLA_VERSION}/zola-v${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz" \
| sudo tar xzf - -C /usr/local/bin
- name: Build the website
run: zola build
- name: Add CNAME
if: github.ref == 'refs/heads/main'
run: echo -n ${{ env.CNAME }} > public/CNAME
- name: Deploy to gh-pages
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
force_orphan: true