-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (46 loc) · 1.6 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install dependencies
run: |
sudo apt-get install aspell-en enchant-2 libxml2-dev libxslt-dev
pip install -r requirements.txt
- name: Build site
run: ./wordspeak_tool.py build
- name: Deploy to staging
uses: burnett01/rsync-deployments@5.2.1
with:
# Switches need to match arguments in authorised_keys
switches: '--rsync-path=/usr/bin/openrsync -av --delete'
path: output/
remote_path: ${{ secrets.STAGING_DEPLOY_PATH }}
remote_host: ${{ secrets.STAGING_DEPLOY_HOST }}
remote_user: ${{ secrets.STAGING_DEPLOY_USER }}
remote_key: ${{ secrets.STAGING_DEPLOY_KEY }}
- name: Run tests
run: |
python3 -c "import enchant; print(enchant.list_languages())"
python3 -c "import os; print(os.environ)"
./wordspeak_tool.py spellchecker
echo $PATH
- name: Deploy to prod (master only)
uses: burnett01/rsync-deployments@5.2.1
with:
# Switches need to match arguments in authorised_keys
switches: '--rsync-path=/usr/bin/openrsync -av --delete'
path: output/
remote_path: ${{ secrets.PROD_DEPLOY_PATH }}
remote_host: ${{ secrets.PROD_DEPLOY_HOST }}
remote_user: ${{ secrets.PROD_DEPLOY_USER }}
remote_key: ${{ secrets.PROD_DEPLOY_KEY }}
if: github.ref == 'refs/heads/master'