Skip to content

Update handler.php

Update handler.php #10

Workflow file for this run

name: Check syntax and sync files to web server
on:
push:
branches:
- master
jobs:
check-and-sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install SSH key
env:
CYB_SSH_KEY: ${{ secrets.CYB_SSH_KEY }}
run: |
mkdir -p ~/.ssh
echo "$CYB_SSH_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
- name: Check syntax
run: sudo apt install php-cli && php -l "$GITHUB_WORKSPACE/index.php"
- name: Setup known hosts
run: ssh-keyscan puffypenguin.cyb.no >> ~/.ssh/known_hosts
- name: Fix permissions for daemon user
run: ssh [email protected] doas -n chmod g+w /var/www/htdocs/
- name: Sync files
run: rsync --rsync-path=/usr/bin/openrsync -v index.php handler.php [email protected]:/var/www/htdocs/