main branch #11
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 website' | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cloning repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- run: | | |
cp -r examples/official-site /tmp/ | |
rm -rf * | |
cp -r /tmp/official-site/* . | |
git config user.name "GitHub Actions Bot" | |
git config user.email "<>" | |
git commit -am "site update $(date)" | |
- name: Push to dokku | |
uses: dokku/github-action@master | |
with: | |
git_remote_url: 'dokku@${{ secrets.DEPLOY_IP }}:sqlpage' | |
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} | |
ssh_host_key: ${{ secrets.SSH_HOST_KEY }} | |
git_push_flags: '--force' | |
branch: 'main' |