Add deployment workflow
This commit is contained in:
parent
7db39d5c5b
commit
893b8f98a8
2 changed files with 27 additions and 3 deletions
23
.github/workflows/deploy.yml
vendored
Normal file
23
.github/workflows/deploy.yml
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
name: Deploy (Production)
|
||||
|
||||
on: workflow_dispatch
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
environment:
|
||||
name: p3k.org
|
||||
url: https://blog.p3k.org
|
||||
|
||||
steps:
|
||||
- name: Set up SSH agent
|
||||
uses: antville/helma/.github/actions/ssh@helma-🐜
|
||||
with:
|
||||
config: ${{ vars.SSH_CONFIG }}
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
known-hosts: ${{ vars.SSH_KNOWN_HOSTS }}
|
||||
|
||||
- name: Copy files to production server
|
||||
run: ssh staging-server deploy-antville
|
||||
|
||||
7
.github/workflows/stage.yml
vendored
7
.github/workflows/stage.yml
vendored
|
|
@ -29,15 +29,16 @@ jobs:
|
|||
- name: Publish to staging server
|
||||
# The rsync command applies the same filters as the one in tools/extras/deploy.sh
|
||||
run: |
|
||||
rsync ./build/install/antville/ antville.dev:./apps/antville/ \
|
||||
rsync ./build/install/antville/ staging-server:./apps/antville/ \
|
||||
--archive --compress --delete --verbose \
|
||||
--filter '+ /claustra' \
|
||||
--filter '+ /code' \
|
||||
--filter '+ /compat' \
|
||||
--filter '+ /db' \
|
||||
--filter '+ /i18n' \
|
||||
--filter '+ /lib' \
|
||||
--filter '- /*'
|
||||
rsync ./build/install/antville/static/ antville.dev:./apps/antville/static/helma/ \
|
||||
rsync ./build/install/antville/static/ staging-server:./apps/antville/static/ \
|
||||
--archive --compress --verbose \
|
||||
--filter '+ /fonts' \
|
||||
--filter '+ /formica.html' \
|
||||
|
|
@ -47,5 +48,5 @@ jobs:
|
|||
--filter '- /*'
|
||||
|
||||
- name: Restart Helma
|
||||
run: ssh antville.dev restart
|
||||
run: ssh staging-server restart
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue