Merge pull request #152 from rchmura/release243 #47
This file contains 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
name: Deploy to Plugin Staging | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+" | |
jobs: | |
tag: | |
name: Deploy to plugin staging | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Build theme | |
working-directory: ./vimeography-harvestone | |
run: | | |
npm ci | |
git clone https://github.com/davekiss/vimeography-blueprint.git node_modules/vimeography-blueprint | |
npm run build | |
- name: Build admin app | |
working-directory: ./lib/admin/app | |
run: | | |
npm install | |
npm run build | |
- name: Deploy build to staging WordPress server | |
run: | | |
# remove non-wordpress deployable files | |
rsync -rc --exclude-from="$GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --delete-excluded | |
# rsync up to staging | |
# https://explainshell.com/explain?cmd=rsync+-p+--chmod%3D%2Brwx+-e+%22ssh+-i+userserver.pem%22+--copy-unsafe-links+-rz+user%40server%3A~%2F+%2Fdb_backups%2Fwww%2F | |
rsync -azv -e 'sshpass -p "${{ secrets.VIMEOGRAPHY_WP_STAGING_SSH_PASSWORD }}" ssh -o StrictHostKeyChecking=no' --no-o --no-g --chmod=ugo=rwX --delete --exclude=logs "$GITHUB_WORKSPACE/trunk/" root@${{ secrets.VIMEOGRAPHY_WP_STAGING_SSH_HOST }}:/var/www/html/wp-content/plugins/vimeography |