Skip to content

better handling of onlyTitleRequested condition #6

better handling of onlyTitleRequested condition

better handling of onlyTitleRequested condition #6

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: tf-deploy
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: garygrossgarten/github-action-ssh@915e492551885a89131e21d85f2e043c96abff80
with:
command: >-
become wp-graphql bash -c '
set -eo pipefail;
cd $HOME/wp-graphql;
echo "Pulling git repo ...";
git checkout main;
git pull --ff-only;
if [[ "$(git diff --name-only HEAD HEAD@{1} | grep -c package.json)" -gt 0 ]]; then
echo "Running npm install ...";
npm install;
fi;
rsync -avu --delete --exclude .git $HOME/wp-graphql/ $HOME/www/js;
npm restart;
'
host: login.toolforge.org
username: ${{ secrets.TOOLFORGE_USERNAME }}
privateKey: ${{ secrets.TOOLFORGE_PRIVATE_KEY }}