Merge pull request #184 from mediasanctuary/main #77
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 www | |
on: | |
push: | |
branches: [production] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
- name: Install dependencies | |
run: | | |
cd wp-content/themes/mediasanctuary | |
npm install | |
- name: Build | |
run: | | |
cd wp-content/themes/mediasanctuary | |
npm run build | |
- name: Sync | |
env: | |
dest: "[email protected]:/home/members/nyma/sites/new.mediasanctuary.org/web/wp-content/" | |
run: | | |
echo "${{secrets.PROD_DEPLOY_KEY}}" > deploy_key | |
chmod 600 ./deploy_key | |
rsync \ | |
--rsh='ssh -i ./deploy_key -o StrictHostKeyChecking=no' \ | |
--delete \ | |
--checksum \ | |
--recursive \ | |
--verbose \ | |
--human-readable \ | |
--filter='P uploads' \ | |
--exclude wp-content/uploads \ | |
./wp-content/ ${{env.dest}} |