update some timestamps #398
This file contains hidden or 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
| --- | |
| # SPDX-FileCopyrightText: © 2022 Sebastian Davids <[email protected]> | |
| # 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: | |
| # https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| defaults: | |
| run: | |
| working-directory: hp | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| # https://github.com/actions/checkout/releases | |
| uses: actions/[email protected] | |
| - name: Classify changes | |
| # https://github.com/dorny/paths-filter/releases | |
| uses: dorny/[email protected] | |
| id: changes | |
| with: | |
| filters: | | |
| sh: | |
| - '**.sh' | |
| yaml: | |
| - '**.yaml' | |
| Dockerfile: | |
| - '.hadolint.yaml' | |
| - '**/Dockerfile' | |
| hp: | |
| - 'hp/**' | |
| - if: steps.changes.outputs.sh == 'true' | |
| name: Ensure shfmt is installed | |
| # https://github.com/mfinelli/setup-shfmt/releases | |
| uses: mfinelli/[email protected] | |
| with: | |
| # https://github.com/mvdan/sh/releases | |
| shfmt-version: 3.12.0 | |
| - if: steps.changes.outputs.sh == 'true' | |
| name: Check shell script formatting | |
| working-directory: . | |
| run: scripts/shellscript_format_check.sh | |
| - 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/[email protected] | |
| with: | |
| dockerfile: httpd/Dockerfile | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Install pnpm | |
| # https://github.com/pnpm/action-setup/releases | |
| uses: pnpm/[email protected] | |
| with: | |
| # https://github.com/pnpm/pnpm/releases | |
| version: 10.14.0 | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Install node | |
| # https://github.com/actions/setup-node/releases | |
| uses: actions/[email protected] | |
| with: | |
| cache: pnpm | |
| cache-dependency-path: hp/pnpm-lock.yaml | |
| # https://github.com/actions/setup-node/issues/1255 | |
| node-version-file: hp/.nvmrc | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Install dependencies | |
| env: | |
| HUSKY: 0 | |
| run: pnpm install | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Check formatting | |
| run: pnpm run format:check | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Lint project files | |
| run: pnpm run lint | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Typecheck project files | |
| run: pnpm run check:types | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Run unit tests | |
| run: pnpm run test:ci | |
| env: | |
| VITEST_SKIP_INSTALL_CHECKS: 1 | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Build project | |
| run: pnpm run build | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Hash CSS | |
| run: pnpm run hash:css | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Hash JS | |
| run: pnpm run hash:js | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Minify JSON-structured script tags | |
| run: pnpm run minify:json-tags | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Minify HTML | |
| run: pnpm run minify:html | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Create .htaccess file | |
| run: pnpm run create:htaccess | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Hash importmap | |
| run: pnpm run hash:importmap | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Minify SVG | |
| run: pnpm run minify:svg | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Hash SVG | |
| run: pnpm run hash:svg | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Minify XML | |
| run: pnpm run minify:xml | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Minify webmanifest | |
| run: pnpm run minify:webmanifest | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Minify traffic-advice | |
| run: pnpm run minify:traffic-advice | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Minify JSON | |
| run: pnpm run minify:json | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Minify robots.txt | |
| run: pnpm run minify:robots | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Add legal notice to robots.txt | |
| run: pnpm run legal:robots | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Compress files | |
| run: pnpm run compress:files | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Create Google Verification file | |
| run: pnpm run create:google-verification-file | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Create timestamp file | |
| run: pnpm run create:timestamp-file | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Check Links | |
| # https://github.com/lycheeverse/lychee-action/releases | |
| uses: lycheeverse/[email protected] | |
| with: | |
| # https://github.com/lycheeverse/lychee/releases | |
| lycheeVersion: v0.19.1 | |
| args: --no-progress --require-https 'hp/dist/**/*.html' | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Run Lighthouse CI | |
| run: pnpm run lhci:ci | |
| env: | |
| LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }} | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Install Playwright | |
| run: > | |
| pnpm exec playwright install --with-deps --no-shell chromium | |
| - if: steps.changes.outputs.hp == 'true' | |
| name: Run playwright Tests | |
| run: pnpm run playwright:ci | |
| - 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/[email protected] | |
| 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/[email protected] | |
| 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 }} | |
| - if: | | |
| steps.changes.outputs.hp == 'true' && | |
| steps.project.outputs.deployment-enabled == 'true' | |
| name: Run Smoke Tests on Deployed Site | |
| run: pnpm run playwright:smoke | |
| env: | |
| PLAYWRIGHT_BASE_URL: https://sdavids.de |