Skip to content

Commit

Permalink
Merge pull request #107 from commonknowledge/add-kinsa-deploy-script-…
Browse files Browse the repository at this point in the history
…template

Add Kintsa deploy script template
  • Loading branch information
Moggach authored Sep 2, 2024
2 parents b09ed66 + f6e7d21 commit 4c7f756
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Deploy to Kinsta template
on:
push:
branches:
- main
jobs:
web-deploy:
name: Deploy to staging
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
config: ${{ secrets.SSH_CONFIG }}
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
name: id_rsa
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Run Git Pull
run: ssh <Kinsta SSH terminal command> "cd public && git pull && exit"
- name: Run Composer install
run: ssh <Kinsta SSH terminal command> "cd public && composer install --no-dev --no-scripts"
- name: Activate Plugins
run: ssh <Kinsta SSH terminal command> "cd public && wp plugin activate --all"
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,7 @@ These are exhaustive manual instructions, but should not be required after initi
17. In Domains, change the DNS pointed domain to your primary one selecting "Make primary".
18. WordPress should now work at the site URL. You can login to the administration dashboard with the password you just created.
19. Repeat steps 7 through 20, but creating a development environment.

### Deploy to Kinsta with GitHub Action
There is a GitHub Action template file for deploying to Kinsta on pushes to main branch. Replace <Kinsta SSH terminal command> with the command for your site from the Kinsta dashboard.
Set up the SSH_PRIVATE_KEY, SSH_CONFIG and SSH_KNOWN_HOSTS secrets in the repository and on the Kinsta server using the Kinsta instructions https://kinsta.com/docs/wordpress-hosting/connect-to-ssh

0 comments on commit 4c7f756

Please sign in to comment.