Merge pull request #125 from hughrun/actions #112
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: Compile and Deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
compile: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install Dev Dependencies | |
run: | | |
sudo apt-get install gettext | |
- name: Install Python 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 | |
- uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: build site | |
commit_author: BookWyrm Bot <[email protected]> | |
- 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' |