Skip to content

Develop Deploy

Develop Deploy #413

name: Develop Deploy
on:
workflow_run:
workflows: [CI]
types: [completed]
branches: [main]
jobs:
deploy:
name: Develop Deploy
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.CI_DEPLOY_KEY }}
name: id_goodbids
known_hosts: unnecessary # Actions have have github.com in known_hosts by default
config: |
Host github.com
HostName github.com
IdentityFile /home/runner/.ssh/id_goodbids
if_key_exists: fail
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Push to remote
run: |
git config --unset-all http.https://github.com/.extraheader
git config user.name "GitHub Actions"
git config user.email [email protected]
git remote add wpvip [email protected]:wpcomvip/goodbids.git
git push -f wpvip main:develop