Skip to content

Commit

Permalink
feat(update-stage.yml): init workflow settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobby-Kim authored Jan 14, 2024
1 parent 67097a9 commit fd9a9f3
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/update-stage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Local Deployment

on:
push:
branches: main

jobs:
deploy:
runs-on: self-hosted
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Load Docker Compose Files
run: |
cp docker-compose.yml /home/skkuding/grafana
cp loki-config-stage.yml /home/skkuding/grafana
cp loki-config-test.yml /home/skkuding/grafana
- name: Set up Grafana Configuration
run: |
cat <<EOF >> /home/skkuding/grafana/grafana.ini
# Non-sensitive configurations
[server]
protocol = http
http_port = 443
domain = grafana.codedang.com
enforce_domain = true
root_url = %(protocol)s://%(domain)s
serve_from_sub_path = true
# Sensitive configurations from GitHub Secrets
[smtp]
enabled = true
host = ${{ secrets.SMTP_HOST }}
user = ${{ secrets.SMTP_USER }}
password = ${{ secrets.SMTP_PASSWORD }}
from_address = ${{ secrets.FROM_ADDRESS }}
from_name = Grafana
startTLS_policy = MandatoryStartTLS
EOF
- name: Run Docker Compose
run: |
cd /home/skkuding/grafana
docker-compose up -d

0 comments on commit fd9a9f3

Please sign in to comment.