-
Notifications
You must be signed in to change notification settings - Fork 108
39 lines (35 loc) · 1.04 KB
/
official-site.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
name: "deploy website"
on:
push:
branches:
- main
concurrency: site-deploy
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Cloning repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- id: get_gitsha
name: Make a commit for the official site
run: |
cp -r examples/official-site /tmp/
rm -rf * .[!.]*
cp -r /tmp/official-site/* .
git init .
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git add .
git commit -am "site update $(date)"
echo "gitsha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
- name: Push to dokku
uses: dokku/github-action@master
with:
git_remote_url: "dokku@${{ secrets.DEPLOY_IP }}:sqlpage"
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
ssh_host_key: ${{ secrets.SSH_HOST_KEY }}
git_push_flags: "--force"
branch: "main"
ci_commit: ${{ steps.get_gitsha.outputs.gitsha }}