-
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (43 loc) · 1.57 KB
/
gnulinuxsa-wordpress.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
39
40
41
42
43
44
45
46
47
48
name: deploy-gnulinuxsa-wordpress
on:
push:
paths:
- '.github/workflows/gnulinuxsa-wordpress.yml'
- 'gnulinuxsa-wordpress/**'
branches: [main]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: gnulinuxsa.org
url: https://gnulinuxsa.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:
MARIADB_PASSWORD: ${{ secrets.gnulinuxsa_wordpress_mariadb_password }}
run: |
sed -i "s|(gnulinuxsa_wordpress_mariadb_password)|$MARIADB_PASSWORD|g" $GITHUB_WORKSPACE/gnulinuxsa-wordpress/docker-compose.yml
- name: Start Deployment
uses: FarisZR/[email protected]
env:
MARIADB_PASSWORD: ${{ secrets.gnulinuxsa_wordpress_mariadb_password }}
with:
remote_docker_host: ${{ secrets.server_address }}
tailscale_ssh: true # no need for manual private and public keys
compose_file_path: gnulinuxsa-wordpress/docker-compose.yml
args: -p gnulinuxsa-wordpress up -d --remove-orphans
upload_directory: true
docker_compose_directory: gnulinuxsa-wordpress