Skip to content

Merge pull request #44 from CycloKid/main #21

Merge pull request #44 from CycloKid/main

Merge pull request #44 from CycloKid/main #21

Workflow file for this run

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