-
Notifications
You must be signed in to change notification settings - Fork 28
53 lines (51 loc) · 1.29 KB
/
website.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
53
name: Website
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
jobs:
build:
name: Build
if: github.repository == 'EmulatorJS/emulatorjs.org'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |
git pull
yarn install
yarn build
- name: Zip Website
run: |
zip -r website.zip .output
- name: Upload Website
uses: actions/upload-artifact@v4
with:
name: website
path: website.zip
retention-days: 1
run:
name: Deploy
needs: build
if: github.repository == 'EmulatorJS/emulatorjs.org'
runs-on: emulatorjs-server
steps:
- name: Download a single artifact
uses: actions/download-artifact@v4
with:
name: website
path: /mnt/HDD/website
- name: Stop Website
run: |
systemctl stop emulatorjs-org
rm -rf /mnt/HDD/website/emulatorjs.org
- name: Unzip Website
run: |
unzip -o /mnt/HDD/website/website.zip -d /mnt/HDD/website/emulatorjs.org
rm /mnt/HDD/website/website.zip
- name: Deploy Website
run: |
systemctl restart emulatorjs-org