From dc7ee7fa6f60b4d00ad43bbaf8eaadddf9216a54 Mon Sep 17 00:00:00 2001 From: lost Date: Tue, 7 May 2024 05:14:56 +0800 Subject: [PATCH] gh-action --- .github/workflows/docs.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..bbe2d74 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,28 @@ +name: docs + +on: + push: + branches: [ main ] + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Install Crystal + uses: crystal-lang/install-crystal@v1 + with: + crystal: nightly + - name: Check out repository code + uses: actions/checkout@v4 + - name: Install dependencies + run: shards install --skip-postinstall --skip-executables + - name: Generate documentation + run: crystal docs + - name: Deploy to GitHub Pages + if: success() + uses: crazy-max/ghaction-github-pages@v4 + with: + target_branch: gh-pages + build_dir: docs + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}