Skip to content

Github Pages

Github Pages #1608

Workflow file for this run

name: Github Pages
on:
push:
branches:
- master
schedule:
- cron: "0 1 * * *"
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Upgrade pip
run: |
# install pip=>20.1 to use "pip cache dir"
python3 -m pip install --upgrade pip
- name: Get pip cache dir
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: python3 -m pip install -r ./requirements.txt
- name: Set up JDK 16
uses: actions/setup-java@v1
with:
java-version: 16
- name: Checkout latest Mindustry tag
run: |
cd ..
git clone https://github.com/Anuken/Mindustry
cd Mindustry
git fetch --tags
latestTag=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "Checking out tag: ${latestTag}"
# git checkout ${latestTag} #disabled until next release, for reasons
- name: Generate docs
run: |
cd ..
git clone https://github.com/Anuken/Mindustry-Wiki-Generator --depth 1
cd Mindustry-Wiki-Generator/
./run.sh
cd ../wiki
mkdocs build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site