Renew SSL Certificates #43
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
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 }} |