Skip to content

chore: update nodejs to 22.11.0 #161

chore: update nodejs to 22.11.0

chore: update nodejs to 22.11.0 #161

Workflow file for this run

---
# SPDX-FileCopyrightText: © 2022 Sebastian Davids <sdavids@gmx.de>
# SPDX-License-Identifier: Apache-2.0
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
# https://docs.ionos.space/docs/github-actions-customization/
# https://docs.ionos.space/docs/git-integration/#v1-projects-created-until-112022
name: ci
on: # yamllint disable-line rule:truthy
push:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
# unfortunately each job is billed for at least 1 minute in GH Actions
# so use one big one to save GH Action minutes
# https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions
lint-build-deploy:
runs-on: ubuntu-22.04
permissions:
contents: read
defaults:
run:
working-directory: hp
steps:
- name: Checkout
# https://github.com/actions/checkout/releases
uses: actions/checkout@v4.2.2
- name: Classify changes
# https://github.com/dorny/paths-filter/releases
uses: dorny/paths-filter@v3.0.2
id: changes
with:
filters: |
sh:
- '**.sh'
yaml:
- '**.yaml'
Dockerfile:
- '.hadolint.yaml'
- '**/Dockerfile'
hp:
- 'hp/**'
- if: steps.changes.outputs.sh == 'true'
name: Lint shell scripts
working-directory: .
run: scripts/shellscript_check.sh
- if: steps.changes.outputs.yaml == 'true'
name: Lint YAML files
working-directory: .
run: yamllint --strict .
- if: steps.changes.outputs.Dockerfile == 'true'
name: Lint httpd Dockerfile
# https://github.com/hadolint/hadolint-action/releases
uses: hadolint/hadolint-action@v3.1.0
with:
dockerfile: httpd/Dockerfile
no-color: true
- if: steps.changes.outputs.hp == 'true'
name: Setup node and install dependencies
uses: ./.github/actions/setup-node-and-install-dependencies
with:
working-directory: hp
node-version-file: hp/.nvmrc
dependencies-lock-file: hp/package-lock.json
- if: steps.changes.outputs.hp == 'true'
name: Post-install esbuild
run: node node_modules/esbuild/install.js
- if: steps.changes.outputs.hp == 'true'
name: Post-install lightningcss-cli
run: node node_modules/lightningcss-cli/postinstall.js
- if: steps.changes.outputs.hp == 'true'
name: Check formatting
run: npm run format:check
- if: steps.changes.outputs.hp == 'true'
name: Lint project files
run: npm run lint
- if: steps.changes.outputs.hp == 'true'
name: Build project
run: npm run build
- if: steps.changes.outputs.hp == 'true'
name: Hash CSS
run: npm run hash:css
- if: steps.changes.outputs.hp == 'true'
name: Hash JS
run: npm run hash:js
- if: steps.changes.outputs.hp == 'true'
name: Minify JSON-structured script tags
run: npm run minify:json-tags
- if: steps.changes.outputs.hp == 'true'
name: Minify HTML
run: npm run minify:html
- if: steps.changes.outputs.hp == 'true'
name: Create .htaccess file
run: npm run create:htaccess
- if: steps.changes.outputs.hp == 'true'
name: Hash importmap
run: npm run hash:importmap
- if: steps.changes.outputs.hp == 'true'
name: Minify SVG
run: npm run minify:svg
- if: steps.changes.outputs.hp == 'true'
name: Hash SVG
run: npm run hash:svg
- if: steps.changes.outputs.hp == 'true'
name: Minify XML
run: npm run minify:xml
- if: steps.changes.outputs.hp == 'true'
name: Minify webmanifest
run: npm run minify:webmanifest
- if: steps.changes.outputs.hp == 'true'
name: Minify traffic-advice
run: npm run minify:traffic-advice
- if: steps.changes.outputs.hp == 'true'
name: Minify robots.txt
run: npm run minify:robots
- if: steps.changes.outputs.hp == 'true'
name: Add legal notice to robots.txt
run: npm run legal:robots
- if: steps.changes.outputs.hp == 'true'
name: Compress files
run: npm run compress:files
- if: steps.changes.outputs.hp == 'true'
name: Create Google Verification file
run: npm run create:google-verification-file
- if: steps.changes.outputs.hp == 'true'
name: Create timestamp file
run: npm run create:timestamp-file dist/.deploy-timestamp
- if: steps.changes.outputs.hp == 'true'
name: Run Lighthouse CI
run: npm run lighthouseci
- if: steps.changes.outputs.hp == 'true'
name: Fetch project data
# https://github.com/ionos-deploy-now/retrieve-project-info-action/releases
uses: ionos-deploy-now/retrieve-project-info-action@v1.4.0
id: project
with:
api-key: ${{ secrets.IONOS_API_KEY }}
project: ${{ secrets.IONOS_PROJECT_ID }}
service-host: api-eu.ionos.space
- if: |
steps.changes.outputs.hp == 'true' &&
steps.project.outputs.deployment-enabled == 'true'
name: Deploy build
# https://github.com/ionos-deploy-now/deploy-to-ionos-action/releases
uses: ionos-deploy-now/deploy-to-ionos-action@v1.4.8
with:
api-key: ${{ secrets.IONOS_API_KEY }}
bootstrap-deploy: ${{ steps.project.outputs.bootstrap-deploy }}
branch-id: ${{ steps.project.outputs.branch-id }}
dist-folder: hp/dist
project: ${{ secrets.IONOS_PROJECT_ID }}
remote-host: ${{ steps.project.outputs.remote-host }}
service-host: api-eu.ionos.space
storage-quota: ${{ steps.project.outputs.storage-quota }}