diff options
author | Linnea Gräf <nea@nea.moe> | 2024-01-29 00:43:17 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-01-29 00:48:12 +0100 |
commit | c331b3b1e73b12f2397ee0ede46ee695020f085c (patch) | |
tree | 90880a55629fac576a69dc45924fa61f864a04b3 | |
parent | b015117a8a7d8471980f23439d0524dcd69f2cdc (diff) | |
download | moddevwiki-c331b3b1e73b12f2397ee0ede46ee695020f085c.tar.gz moddevwiki-c331b3b1e73b12f2397ee0ede46ee695020f085c.tar.bz2 moddevwiki-c331b3b1e73b12f2397ee0ede46ee695020f085c.zip |
Add github action deploy
-rw-r--r-- | .github/workflows/deploy.yml | 35 | ||||
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | requirements.txt | 2 |
3 files changed, 39 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 + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1adc467 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +site/ + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..1ee83b9 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +mkdocs-material + |