🔥 Activate website (#88) #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Deploy to GitHub Pages | |
on: | |
push: | |
branches: [ "master", "main" ] | |
pull_request: | |
branches: [ "master", "main" ] | |
workflow_dispatch: | |
jobs: | |
build: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get Data | |
uses: actions/checkout@v3 | |
with: | |
repository: "LeStegii/server-softwares" | |
path: "." | |
ref: "master" | |
- name: Get Frontend | |
uses: actions/checkout@v3 | |
with: | |
repository: "lunofe/mcss-frontend" | |
path: "mcss-frontend" | |
ref: "main" | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r mcss-frontend/requirements.txt | |
- name: Run Python Build Script | |
run: | | |
cd mcss-frontend | |
git log -1 --pretty=%h > commit.txt | |
cd .. | |
python3 mcss-frontend/build.py | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@4.1.0 | |
with: | |
branch: website | |
folder: mcss-frontend/build |