Skip to content

Renew SSL Certificates #33

Renew SSL Certificates

Renew SSL Certificates #33

Workflow file for this run

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
- name: Make config file
run: |
echo "dns_gandi_api_key=${GANDI_API_KEY}" > gandi.ini
chmod 600 gandi.ini
env:
GANDI_API_KEY: ${{ secrets.GANDI_API_KEY }}
- 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 }}