Skip to content

Commit

Permalink
Merge pull request #116 from hughrun/deploy
Browse files Browse the repository at this point in the history
compile and deploy site on push to main
  • Loading branch information
mouse-reeve authored Nov 20, 2023
2 parents bbd9480 + ea7d893 commit 0d47e3a
Showing 1 changed file with 43 additions and 14 deletions.
57 changes: 43 additions & 14 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,54 @@
name: Deploy
name: Compile and Deploy

on:
push:
branches:
- main

jobs:
build:

compile:
runs-on: ubuntu-latest
steps:

- name: Check out code
- uses: actions/checkout@v2

- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Process translations
run: |
./bw-dev messages:update
- name: Compile site
run: |
python generate.py
deploy:
needs: compile
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Deploy to server
id: deploy
uses: Pendect/[email protected]
env:
DEPLOY_KEY: ${{secrets.DEPLOY_KEY}}
with:
flags: '-avzr --delete'
options: ''
ssh_options: ''
src: 'site/'
dest: '[email protected]:/var/www/docs-bookwyrm/html'

- name: Checkout code
- uses: actions/checkout@v2

- name: Deploy to server
id: deploy
uses: Pendect/[email protected]
env:
DEPLOY_KEY: ${{secrets.DEPLOY_KEY}}
with:
flags: '-avzr --delete'
options: ''
ssh_options: ''
src: 'site/'
dest: '[email protected]:/var/www/docs-bookwyrm/html'

0 comments on commit 0d47e3a

Please sign in to comment.