aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/deploy.yml35
1 files changed, 35 insertions, 0 deletions
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
new file mode 100644
index 0000000..4499b6c
--- /dev/null
+++ b/.github/workflows/deploy.yml
@@ -0,0 +1,35 @@
+name: Deploy
+on:
+ - push
+
+
+permissions:
+ contents: write
+jobs:
+ deploy:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - 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
+