name: Deploy on: - push permissions: contents: write jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: fetch-depth: 0 - uses: actions/setup-python@v4 with: python-version: 3.x - name: Get pip cache dir id: pip-cache run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV - name: Cache dependencies uses: actions/cache@v3 with: path: ${{ steps.pip-cache.outputs.dir }} key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}${{ hashFiles('**/mkdocs.yml') }} restore-keys: | ${{ runner.os }}-pip- - run: pip install -r requirements.txt - run: mkdocs build - uses: peaceiris/actions-gh-pages@v3 if: github.ref == 'refs/heads/master' with: github_token: ${{ secrets.GITHUB_TOKEN }} cname: moddev.nea.moe publish_dir: ./site