-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #116 from hughrun/deploy
compile and deploy site on push to main
- Loading branch information
Showing
1 changed file
with
43 additions
and
14 deletions.
There are no files selected for viewing
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
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' |