Skip to content

Bump actions/checkout from 3 to 4 (#20) #20

Bump actions/checkout from 3 to 4 (#20)

Bump actions/checkout from 3 to 4 (#20) #20

Workflow file for this run

name: 'site'
on:
push:
paths:
- 'site/**'
- '.github/workflows/site.yml'
pull_request:
paths:
- 'site/**'
- '.github/workflows/site.yml'
jobs:
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get Hugo and Theme
run: |
HUGO_VERSION=0.101.0
curl -fsSL https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz | sudo tar xzf - -C /usr/local/bin hugo
sudo chmod +x /usr/local/bin/hugo
mkdir -p site/themes
cd site/themes
git clone https://github.com/bep/docuapi
cd docuapi
npm install --only=dev
mv node_modules ../..
- name: Build site
run: |
cd site
hugo version
hugo --gc --minify
- uses: actions/upload-artifact@v3
with:
name: site
path: site/public
- name: Publish site to gh-pages
if: success() && github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
run: |
cd site/public/
touch .nojekyll
git init
cp ../../.git/config ./.git/config
git add .
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -a -m "update ${{ github.sha }}"
git push -u origin +HEAD:gh-pages