Skip to content

Publish Site

Publish Site #500

Workflow file for this run

name: Publish Site
on:
pull_request:
paths:
- docs/**
push:
branches:
- main
schedule:
- cron: 0 20 * * *
permissions:
contents: read
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.111.0'
extended: true
- name: Install deps
run: |
npm install postcss-cli
npm install autoprefixer
- name: Build package docs
run: |
make BASE_URL=https://rancher.github.io/elemental-toolkit build-docs
- name: Deploy
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: public