Forked from doreybenjamin/gist:6ab21d0633f51c74548baa2dcf3e1e9d
Created
October 21, 2024 10:28
-
-
Save ValeriiVasyliev/0e36a142ee808b22747d75f2842abaab to your computer and use it in GitHub Desktop.
Revisions
-
Dorey Benjamin revised this gist
Apr 26, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -52,7 +52,7 @@ jobs: # build sage based theme (remove if not used) - name: Update Composer Sage run: cd web/app/themes/${{ env.THEME }} && composer update --prefer-dist --no-progress --no-dev - name: Install and build JS dependencies run: cd web/app/themes/${{ env.THEME }} && yarn && yarn build:production -
Dorey Benjamin revised this gist
Apr 26, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -60,7 +60,7 @@ jobs: # Environment config - name: Push files to the remote run: rsync --progress -avz --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --exclude=".git/" --exclude=".lando.yml" --exclude ".github/" --exclude "/web/app/themes/${{ env.THEME }}/node_modules/" --exclude "/web/app/themes/${{ env.THEME }}/resources/assets/" --exclude=".gitignore" --exclude "/web/app/themes/${{ env.THEME }}/package.json" --exclude "/web/app/themes/${{ env.THEME }}/.npmrc" --exclude "/web/app/themes/${{ env.THEME }}/yarn.lock" -e 'ssh -o StrictHostKeyChecking=no -p ${{ env.SSH_PORT }}' ./ ${{ env.SSH_USERNAME }}@${{ env.SSH_HOST }}:${{ env.KINSTA_FOLDER }} - name: Clear cache on kinsta -
Dorey Benjamin revised this gist
Apr 25, 2022 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -19,6 +19,7 @@ jobs: SSH_USERNAME: ${{ secrets.USERNAME }} #username KINSTA_FOLDER: ${{ secrets.REMOTE_DIR }} #/var/www/public DOMAIN: ${{ secrets.DOMAIN_STAGING }} #url.com THEME: 'themename' steps: - uses: actions/checkout@v2 @@ -54,12 +55,12 @@ jobs: run: cd web/app/themes/sage && composer update --prefer-dist --no-progress --no-dev - name: Install and build JS dependencies run: cd web/app/themes/${{ env.THEME }} && yarn && yarn build:production # Environment config - name: Push files to the remote run: rsync --progress -avz --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --exclude=".git/" --exclude=".lando.yml" --exclude ".github/" --exclude "/web/app/themes/${{ env.THEME }}/node_modules/" --exclude "/web/app/themes/${{ env.THEME }}/assets/" --exclude=".gitignore" --exclude "/web/app/themes/${{ env.THEME }}/yarn.json" --exclude "/web/app/themes/${{ env.THEME }}/package.json" --exclude "/web/app/themes/${{ env.THEME }}/.npmrc" -e 'ssh -o StrictHostKeyChecking=no -p ${{ env.SSH_PORT }}' ./ ${{ env.SSH_USERNAME }}@${{ env.SSH_HOST }}:${{ env.KINSTA_FOLDER }} - name: Clear cache on kinsta -
Dorey Benjamin revised this gist
Apr 14, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -59,7 +59,7 @@ jobs: # Environment config - name: Push files to the remote run: rsync --progress -avz --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --exclude=".git/" --exclude ".github/" --exclude "/web/app/themes/verkor/node_modules/" -e 'ssh -o StrictHostKeyChecking=no -p ${{ env.SSH_PORT }}' ./ ${{ env.SSH_USERNAME }}@${{ env.SSH_HOST }}:${{ env.KINSTA_FOLDER }} - name: Clear cache on kinsta -
Dorey Benjamin revised this gist
Mar 3, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -28,7 +28,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: '7.4' - name: Install SSH key uses: shimataro/ssh-key-action@v2 -
Dorey Benjamin created this gist
Feb 7, 2022 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,67 @@ #Go in your kinsta serv with ssh in terminal and make this two steps : #1: cat ~/.ssh/id_rsa.pub and copy paste in user setting in kinsta and SSH KEY #2: cat ~/.ssh/id_rsa and copy paste in secret SSH_KEY name: Deploy to Kinsta on: push: branches: [ main ] jobs: deploy: runs-on: ubuntu-latest env: ACF_PRO_KEY: ${{ secrets.ACF_PRO_KEY }} #exemple for premium plugins SSH_PORT: ${{ secrets.PORT }} #1547 SSH_HOST: ${{ secrets.HOST }} #0.0.0.0 SSH_KEY: ${{ secrets.SSH_KEY }} KNOWN_HOSTS: ${{ secrets.KNOWN_HOSTS }} #0.0.0.0:1547 SSH_USERNAME: ${{ secrets.USERNAME }} #username KINSTA_FOLDER: ${{ secrets.REMOTE_DIR }} #/var/www/public DOMAIN: ${{ secrets.DOMAIN_STAGING }} #url.com steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: node-version: '14' - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: '7.3' - name: Install SSH key uses: shimataro/ssh-key-action@v2 with: key: ${{ env.SSH_KEY }} name: id_rsa # optional known_hosts: ${{ env.KNOWN_HOSTS }} if_key_exists: fail # replace / ignore / fail; optional (defaults to fail) - name: Cache Composer packages id: composer-cache uses: actions/cache@v2 with: path: vendor key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} restore-keys: | ${{ runner.os }}-php- - name: Update Composer Bedrock run: composer update --prefer-dist --no-progress --no-dev # build sage based theme (remove if not used) - name: Update Composer Sage run: cd web/app/themes/sage && composer update --prefer-dist --no-progress --no-dev - name: Install and build JS dependencies run: cd web/app/themes/sage && yarn && yarn build:production # Environment config - name: Push files to the remote run: rsync --progress -avz --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r -e 'ssh -o StrictHostKeyChecking=no -p ${{ env.SSH_PORT }}' ./ ${{ env.SSH_USERNAME }}@${{ env.SSH_HOST }}:${{ env.KINSTA_FOLDER }} - name: Clear cache on kinsta run: ssh ${{ env.SSH_USERNAME }}@${{ env.SSH_HOST }} -p ${{ env.SSH_PORT }} 'curl https://${{ env.DOMAIN }}/kinsta-clear-cache-all'