Skip to content

Merge pull request #63 from cmahnke/dependabot/github_actions/actions… #245

Merge pull request #63 from cmahnke/dependabot/github_actions/actions…

Merge pull request #63 from cmahnke/dependabot/github_actions/actions… #245

Workflow file for this run

name: Publish on GitHub pages
on:
push:
branches:
- main
schedule:
- cron: '30 23 1 * *'
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: true # Fetch Hugo themes (true OR recursive)
- name: Login to GitHub Packages Docker Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
logout: false
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version-file: '.nvmrc'
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install required dependencies
run: |
./scripts/github-setup.sh
- name: Setup Hugo
uses: peaceiris/[email protected]
with:
hugo-version: '0.109.0'
extended: true
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v1
id: cpu-cores
- name: Create IIIF derivates
env:
CORES: ${{ steps.cpu-cores.outputs.count }}
# UID is also available via $(id -u)
run: |
echo "Running as ${UID}"
docker run -e CHOWN_UID=${UID} -e URL_PREFIX="https://labs.projektemacher.org/" -v ${PWD}:${PWD} ghcr.io/cmahnke/iiif-action:latest-jxl-uploader sh -c "cd ${PWD} && ./scripts/iiif.sh"
- name: Generate Files
env:
SKIP_IIIF: yes
CORES: ${{ steps.cpu-cores.outputs.count }}
run: |
./scripts/setup.sh
- name: Build Hugo site
run: hugo --printI18nWarnings --printUnusedTemplates
- name: Run post build script
run: |
./scripts/post-build/qr-codes.sh
- name: Validate JSON
env:
OSTYPE: linux
run: |
yarn run validate
- name: Puppeteer
run: ./themes/projektemacher-base/scripts/github/check-js-errors.sh
- name: Deploy site
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
force_orphan: true