From c331b3b1e73b12f2397ee0ede46ee695020f085c Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Mon, 29 Jan 2024 00:43:17 +0100 Subject: Add github action deploy --- .github/workflows/deploy.yml | 35 +++++++++++++++++++++++++++++++++++ .gitignore | 2 ++ requirements.txt | 2 ++ 3 files changed, 39 insertions(+) create mode 100644 .github/workflows/deploy.yml create mode 100644 .gitignore create mode 100644 requirements.txt 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 + -- cgit