From 12519fdce51401ea34b31bdbcac72fe6af538d7f Mon Sep 17 00:00:00 2001 From: Ben C Date: Tue, 1 Mar 2022 19:38:54 -0800 Subject: [PATCH] Add Action --- .github/workflows/main.yml | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..59816a49 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,48 @@ +name: Build Docs + +on: + push: + branches: [ master ] + paths: + - docs/ + - NewHorizons/*schema*.json + + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - run: cp -r docs/** . + + - name: Install dependecies + uses: VaultVulp/action-pipenv@v2.0.1 + with: + command: install + + - name: Copy Schemas + run: | + mkdir schemas/ + cp NewHorizons/schema.json schemas/ + cp NewHorizons/star_system_schema.json schemas/ + cp NewHorizons/translation_schema.json schemas/ + + - name: Create Output Dir + run: | + mkdir out/ + mkdir out/schemas/ + + - name: Build Site + uses: VaultVulp/action-pipenv@v2.0.1 + with: + command: run python generate.py + + - name: Deploy To Pages + uses: JamesIves/github-pages-deploy-action@4.1.5 + with: + branch: gh-pages + folder: out/ +