Merge pull request #281 from cmahnke/dependabot/submodules/themes/pro… #725
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish on GitHub pages | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
schedule: | |
- cron: '30 23 1 * 1' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
HUGO_VERSION: 0.138.0 | |
DEPENDENCY_MANAGER: yarn | |
jobs: | |
deploy: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true # Fetch Hugo themes (true OR recursive) | |
- name: Setup Node.js | |
uses: actions/[email protected] | |
with: | |
node-version-file: '.nvmrc' | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Set up Python | |
uses: actions/[email protected] | |
with: | |
python-version: '3.12' | |
- name: Install required dependencies | |
run: | | |
./scripts/github-setup.sh | |
- name: Setup Hugo | |
uses: peaceiris/[email protected] | |
with: | |
hugo-version: ${{ env.HUGO_VERSION }} | |
extended: true | |
- name: Create IIIF derivates | |
run: docker run -e CHOWN_UID=${UID} -e URL_PREFIX="https://christianmahnke.de/" -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 | |
run: | | |
./scripts/setup.sh | |
- name: Generate stats | |
run: | | |
./themes/projektemacher-base/scripts/stat.sh | |
- name: Build Hugo site | |
run: hugo --printI18nWarnings --printUnusedTemplates | |
- name: Puppeteer | |
run: ./themes/projektemacher-base/scripts/github/check-js-errors.sh | |
- name: Archive links | |
run: python ./themes/projektemacher-base/scripts/archive.py -d docs/ -e projektemacher.org -a 14 | |
- name: Deploy site | |
uses: peaceiris/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs | |
force_orphan: true |