From 93a097f2e7ce7279e43f2666b8c0b3b3201bcd77 Mon Sep 17 00:00:00 2001 From: JohnHeikens Date: Sat, 25 Jul 2026 12:12:48 +0200 Subject: [PATCH] Remove shared GitHub Pages deployment workflow --- .github/workflows/deploy-site-with-pages.yml | 170 ------------------- 1 file changed, 170 deletions(-) delete mode 100644 .github/workflows/deploy-site-with-pages.yml diff --git a/.github/workflows/deploy-site-with-pages.yml b/.github/workflows/deploy-site-with-pages.yml deleted file mode 100644 index 144a9cb..0000000 --- a/.github/workflows/deploy-site-with-pages.yml +++ /dev/null @@ -1,170 +0,0 @@ -name: Reusable site deploy with Pages - -on: - workflow_call: - inputs: - deploy_host: - required: false - type: string - default: "167.235.54.105" - deploy_port: - required: false - type: string - default: "22" - deploy_user: - required: false - type: string - default: "root" - deploy_path: - required: true - type: string - deploy_source: - required: false - type: string - default: "." - checkout_sparse: - required: false - type: string - default: "" - node_version: - required: false - type: string - default: "" - setup_command: - required: false - type: string - default: "" - install_command: - required: false - type: string - default: "" - build_command: - required: false - type: string - default: "" - rsync_excludes: - required: false - type: string - default: "" - secrets: - deploy_ssh_key: - required: true - -permissions: - contents: read - -jobs: - prepare: - runs-on: ubuntu-latest - steps: - - name: Check out repository - if: ${{ inputs.checkout_sparse == '' }} - uses: actions/checkout@v4 - - - name: Check out repository (sparse) - if: ${{ inputs.checkout_sparse != '' }} - uses: actions/checkout@v4 - with: - sparse-checkout: ${{ inputs.checkout_sparse }} - sparse-checkout-cone-mode: false - - - name: Set up Node.js - if: ${{ inputs.node_version != '' }} - uses: actions/setup-node@v4 - with: - node-version: ${{ inputs.node_version }} - - - name: Run setup command - if: ${{ inputs.setup_command != '' }} - run: ${{ inputs.setup_command }} - - - name: Run install command - if: ${{ inputs.install_command != '' }} - run: ${{ inputs.install_command }} - - - name: Run build command - if: ${{ inputs.build_command != '' }} - run: ${{ inputs.build_command }} - - - name: Validate deploy source - run: | - if [ ! -d "${{ inputs.deploy_source }}" ]; then - echo "Deploy source directory '${{ inputs.deploy_source }}' does not exist." >&2 - exit 1 - fi - - - name: Stage deploy files - run: | - STAGE_DIR="$RUNNER_TEMP/site" - mkdir -p "$STAGE_DIR" - - EXCLUDE_ARGS=( - "--exclude=.git/" - "--exclude=.github/" - ) - - while IFS= read -r pattern; do - if [ -n "$pattern" ]; then - EXCLUDE_ARGS+=("--exclude=$pattern") - fi - done <<'EOF' - ${{ inputs.rsync_excludes }} - EOF - - rsync -a \ - "${EXCLUDE_ARGS[@]}" \ - "${{ inputs.deploy_source }}/" \ - "$STAGE_DIR/" - - - name: Upload deploy artifact - uses: actions/upload-artifact@v4 - with: - name: site-build - path: ${{ runner.temp }}/site - - - name: Upload GitHub Pages artifact - uses: actions/upload-pages-artifact@v3 - with: - path: ${{ runner.temp }}/site - - deploy-pages: - needs: prepare - runs-on: ubuntu-latest - permissions: - contents: read - pages: write - id-token: write - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 - - deploy-server: - needs: prepare - runs-on: ubuntu-latest - steps: - - name: Download deploy artifact - uses: actions/download-artifact@v4 - with: - name: site-build - path: ${{ runner.temp }}/site - - - name: Start SSH agent - uses: webfactory/ssh-agent@v0.9.0 - with: - ssh-private-key: ${{ secrets.deploy_ssh_key }} - - - name: Trust deploy host - run: | - mkdir -p ~/.ssh - ssh-keyscan -p "${{ inputs.deploy_port }}" -H "${{ inputs.deploy_host }}" >> ~/.ssh/known_hosts - - - name: Sync files to server - run: | - rsync -az --delete \ - -e "ssh -p ${{ inputs.deploy_port }}" \ - "${{ runner.temp }}/site/" \ - "${{ inputs.deploy_user }}@${{ inputs.deploy_host }}:${{ inputs.deploy_path }}/"