Merge pull request #135 from anvilistas/pre-commit-ci-update-config #48
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: merge_to_main | |
on: | |
push: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Add SSH config | |
env: | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
run: | | |
mkdir -p /home/runner/.ssh | |
echo "${{ secrets.ANVIL_HOST }}" > /home/runner/.ssh/known_hosts | |
echo "${{ secrets.ANVIL_SSH_KEY }}" > /home/runner/.ssh/github_actions | |
chmod 600 /home/runner/.ssh/github_actions | |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null | |
ssh-add /home/runner/.ssh/github_actions | |
- name: Deploy to production master | |
env: | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
run: | | |
git config --global user.name "GitHubActions" | |
git config --global user.email "[email protected]" | |
git remote add anvil "${{ secrets.ANVIL_REPO_URL }}" | |
git push anvil main:master --force | |
git push --tags anvil |