-
Notifications
You must be signed in to change notification settings - Fork 5
38 lines (31 loc) · 1.19 KB
/
certs.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
name: Renew SSL Certificates
on:
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:
jobs:
certs:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v3
with:
python-version: '3.7'
- name: Install certbot and plugin
run: |
pip install certbot
pip install certbot-plugin-gandi
pip install six
- name: Make config file
run: |
echo "dns_gandi_token=${GANDI_TOKEN}" > gandi.ini
chmod 600 gandi.ini
env:
GANDI_TOKEN: ${{ secrets.GANDI_TOKEN }}
- name: Generate certificates
run: certbot certonly --non-interactive --email $LETSENCRYPT_EMAIL --agree-tos --authenticator dns-gandi --dns-gandi-credentials gandi.ini -d exlibrisrpg.com -d \*.exlibrisrpg.com --server https://acme-v02.api.letsencrypt.org/directory --config-dir config --work-dir work --logs-dir logs
env:
LETSENCRYPT_EMAIL: ${{ secrets.LETSENCRYPT_EMAIL }}
- name: Install certificates
run: heroku certs:update config/live/exlibrisrpg.com/fullchain.pem config/live/exlibrisrpg.com/privkey.pem -a exlibris-production --confirm=exlibris-production
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}