Skip to content

docs/core: document control panel logs #9

docs/core: document control panel logs

docs/core: document control panel logs #9

Workflow file for this run

---
name: Hugo (CD)
on:
# Only deploy when it is accepted for production
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
env:
HUGO_CACHEDIR: /tmp/hugo_cache/
HUGO_BASE_URL: "https://botlabs-gg.github.io/yagpdb-docs-v2"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: latest
# We use the extended version just to be on the safe side.
# It is recommended anyway.
extended: true
- name: Cache Hugo modules
uses: actions/cache@v3
with:
path: ${{ env.HUGO_CACHEDIR }}
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-hugomod-
- name: Build website
# See https://discourse.gohugo.io/t/solved-what-should-be-used-for-the-value-of-site-baseurl/5896
# for why we set baseURL here and not in hugo.toml.
run: hugo mod vendor && hugo --minify --baseURL=${{ env.HUGO_BASE_URL }}
- name: Setup Pages
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
id: pages
uses: actions/configure-pages@v4
- name: Upload artifact
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: actions/upload-pages-artifact@v2
with:
path: ./public
deploy:
# Only deploy if it's actually on production branch
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3