Skip to content

Merge pull request #15 from modelix/ci/build-and-deploy-workflow #2

Merge pull request #15 from modelix/ci/build-and-deploy-workflow

Merge pull request #15 from modelix/ci/build-and-deploy-workflow #2

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.128.2'
extended: true
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
cache-dependency-path: '**/package-lock.json'
- name: Install Dependencies
run: npm ci
- name: Build
run: hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
personal_token: ${{ secrets.RELEASE_TOKEN }}
external_repository: modelix/modelix.github.io
publish_branch: main
publish_dir: ./public
cname: modelix.org