-
Notifications
You must be signed in to change notification settings - Fork 85
54 lines (42 loc) · 1.52 KB
/
deploy.yaml
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
48
49
50
51
52
53
54
name: Coursebook Deploy
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
build_focus: [WIKI, EPUB, PDF]
env:
BUILD_FOCUS: ${{ matrix.build_focus }}
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup python (3.7.17)
uses: actions/setup-python@v2
with:
python-version: 3.7.17
#3.6.15
- name: Install
run: |
bash _scripts/install.sh
- name: Build coursebook
run: |
bash _scripts/script.sh
- name: Deploy site
run: |
# https://github.community/t/github-actions-bot-email-address/17204/6
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "Github Actions Bot"
export COMMITTER_EMAIL="[email protected]"
export AUTHOR_NAME="Github Actions"
# Needed to add the --no-tty --batch --yes flags to get gpg to work in Github Actions
# Based on this: https://discuss.circleci.com/t/error-sending-to-agent-inappropriate-ioctl-for-device/17465/3
gpg --no-tty --batch --yes --passphrase ${{ secrets.GPG_PASSPHRASE }} --output /tmp/deploy_site --decrypt site-deploy.enc
gpg --no-tty --batch --yes --passphrase ${{ secrets.GPG_PASSPHRASE }} --output /tmp/deploy_wiki --decrypt wiki-deploy.enc
eval "$(ssh-agent -s)"
chmod 600 /tmp/deploy_site
chmod 600 /tmp/deploy_wiki
bash _scripts/deploy.sh