Skip to content

Fixed the build process and cleaned old Dockerfile #2

Fixed the build process and cleaned old Dockerfile

Fixed the build process and cleaned old Dockerfile #2

Workflow file for this run

name: "Documentation"
on:
workflow_call:
pull_request:
branches:
- "master"
paths:
- ".github/workflows/documentation.yml"
- "docs/**"
push:
branches:
- "master"
paths:
- ".github/workflows/documentation.yml"
- "docs/**"
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
name: "Build documentation site"
runs-on: "ubuntu-22.04"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Build site"
run: |
docker run --rm -v "${{ github.workspace }}:/src" -w /src \
ghcr.io/phppdf/docker-image-hugo:dev \
--minify --source docs --destination ../public --themesDir /hugo-themes
- name: "Upload Pages artifact"
uses: "actions/upload-pages-artifact@v3"
with:
path: "public"
deploy:
name: "Deploy to GitHub Pages"
if: "github.ref == 'refs/heads/master' && github.event_name == 'push'"
needs: "build"
runs-on: "ubuntu-22.04"
environment:
name: "github-pages"
url: "${{ steps.deployment.outputs.page_url }}"
steps:
- name: "Deploy to GitHub Pages"
id: "deployment"
uses: "actions/deploy-pages@v4"