Skip to content

Update postgres:16.6-alpine Docker digest to 91e7554 (#44) #6

Update postgres:16.6-alpine Docker digest to 91e7554 (#44)

Update postgres:16.6-alpine Docker digest to 91e7554 (#44) #6

Workflow file for this run

name: deploy-plausible
on:
push:
paths:
- '.github/workflows/plausible.yml'
- 'plausible/**'
branches: [main]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: Plausible
url: https://pa.aosus.org
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Tailscale
uses: tailscale/github-action@7a0b30ed3517c2244d1330e39467b95f067a33bd
with:
oauth-client-id: ${{ secrets.TAILSCALE_CLIENT_ID }}
oauth-secret: ${{ secrets.TAILSCALE_SECRET }}
tags: tag:deploy-ci
hostname: Github-actions
version: ${{ vars.TAILSCALE_VERSION }}
- name: Add secrets to compose
env:
SECRET_KEY_BASE: ${{ secrets.plausible_secret_key_base }}
TOTP_VAULT_KEY: ${{ secrets.plausible_totp_vault_key }}
SMTP_USER_PWD: ${{ secrets.plausible_smtp_user_pwd }}
GOOGLE_CLIENT_ID: ${{ secrets.plausible_google_client_id }}
GOOGLE_CLIENT_SECRET: ${{ secrets.plausible_google_client_secret }}
POSTGRES_PASSWORD: ${{ secrets.plausible_postgres_password }}
MAXMIND_LICENSE_KEY: ${{ secrets.plausible_maxmind_license_key }}
run: |
sed -i "s|(plausible_secret_key_base)|$SECRET_KEY_BASE|g" $GITHUB_WORKSPACE/plausible/docker-compose.yml
sed -i "s|(plausible_totp_vault_key)|$TOTP_VAULT_KEY|g" $GITHUB_WORKSPACE/plausible/docker-compose.yml
sed -i "s|(plausible_smtp_user_pwd)|$SMTP_USER_PWD|g" $GITHUB_WORKSPACE/plausible/docker-compose.yml
sed -i "s|(plausible_google_client_id)|$GOOGLE_CLIENT_ID|g" $GITHUB_WORKSPACE/plausible/docker-compose.yml
sed -i "s|(plausible_google_client_secret)|$GOOGLE_CLIENT_SECRET|g" $GITHUB_WORKSPACE/plausible/docker-compose.yml
sed -i "s|(plausible_postgres_password)|$POSTGRES_PASSWORD|g" $GITHUB_WORKSPACE/plausible/docker-compose.yml
sed -i "s|(plausible_maxmind_license_key)|$MAXMIND_LICENSE_KEY|g" $GITHUB_WORKSPACE/plausible/docker-compose.yml
- name: Start Deployment
uses: FarisZR/[email protected]
with:
remote_docker_host: ${{ secrets.server_address }}
tailscale_ssh: true # no need for manual private and public keys
compose_file_path: plausible/docker-compose.yml
args: -p plausible up -d --remove-orphans
upload_directory: true
docker_compose_directory: plausible