-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.63 KB
/
deploy.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
49
50
51
52
name: Deploy
on:
push:
branches:
- main
jobs:
build-and-restart:
runs-on: self-hosted
steps:
- name: Pull the latest changes
working-directory: /home/iforge/ignis/
run: git pull
- name: Notify Discord Maintenance Start
uses: tsickert/[email protected]
with:
webhook-url: ${{ secrets.DISCORD_ANNOUCE_WEBHOOK_URL }}
embed-title: "Ignis Entering Maintenance Mode"
embed-color: 15548997
embed-description: "Ignis is going down for maintenance and will be back up shortly"
- name: Throw up the maintenance page
run: touch /home/iforge/ignis-config/file_flags/maintenance_mode/enabled
- name: Sort out env for pnpm
run: |
echo "/home/iforge/.nvm/versions/node/v20.11.0/bin" >> $GITHUB_PATH
echo "/home/iforge/.local/share/pnpm" >> $GITHUB_PATH
- name: Install Packages
working-directory: /home/iforge/ignis
run: pnpm install --frozen-lockfile
- name: Build the project
working-directory: /home/iforge/ignis/
run: turbo build
- name: Restart systemd service
run: /home/iforge/ignis-config/scripts/start_or_restart.sh
- name: Remove maintenance page
run: rm /home/iforge/ignis-config/file_flags/maintenance_mode/enabled
- name: Notify Discord Maintenance Start
uses: tsickert/[email protected]
with:
webhook-url: ${{ secrets.DISCORD_ANNOUCE_WEBHOOK_URL }}
embed-title: "Ignis Exiting Maintenance Mode"
embed-color: 5763719
embed-description: "Ignis is back online!"