Merge tag 'mailto-output' into develop #412
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 | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Repo | |
uses: actions/checkout@v3 | |
# SCSS | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Setup Node | |
run: npm ci | |
- uses: xt0rted/stylelint-problem-matcher@v1 | |
- name: Check SCSS | |
run: npm test | |
# PHP | |
- name: Check PHP | |
uses: chekalsky/phpcs-action@v1 | |
with: | |
enable_warnings: true | |
- name: Setup PHP | |
uses: shivammathur/setup-php@master | |
with: | |
php-version: 7.3 | |
- name: install PHP deps | |
run: composer install | |
# npm build | |
- name: npm run build | |
run: npm run build | |
# Sync to server | |
- name: Install sshpass | |
run: sudo apt-get -y install sshpass | |
- name: Sync to Staging | |
if: github.ref == 'refs/heads/develop' | |
env: | |
SSH_PASS: ${{ secrets.SSH_PASS }} | |
SSH_USER: ${{ secrets.SSH_USER }} | |
SSH_IP: ${{ secrets.SSH_IP }} | |
GMAPS_API: ${{ secrets.GMAPS_API_KEY }} | |
run: | | |
rm -rf .git build node_modules scss | |
sed -i "s/\*\*\*API KEY\*\*\*/$GMAPS_API/g" dist/page-mapgenerator.php | |
sshpass -p "$SSH_PASS" rsync --delete -aqz -e "ssh -o StrictHostKeyChecking=no" dist/* $SSH_USER@$SSH_IP:html/qnipsel-staging/wp-content/themes/templateq | |
- name: Sync to Production | |
if: github.ref == 'refs/heads/master' | |
env: | |
SSH_PASS: ${{ secrets.SSH_PASS }} | |
SSH_USER: ${{ secrets.SSH_USER }} | |
SSH_IP: ${{ secrets.SSH_IP }} | |
GMAPS_API: ${{ secrets.GMAPS_API_KEY }} | |
run: | | |
rm -rf .git build node_modules scss | |
sed -i "s/\*\*\*API KEY\*\*\*/$GMAPS_API/g" dist/page-mapgenerator.php | |
sshpass -p "$SSH_PASS" rsync --delete -aqz -e "ssh -o StrictHostKeyChecking=no" dist/* $SSH_USER@$SSH_IP:html/qnipsel/wp-content/themes/templateq |