From 079e4fccf3c3ff85df6de4450d2f9153d3807d6e Mon Sep 17 00:00:00 2001 From: Sam Phillips Date: Sun, 26 Nov 2023 16:18:08 -0800 Subject: [PATCH] [gha] Add documentation action --- .github/workflows/doc.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/doc.yml diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml new file mode 100644 index 0000000..947d275 --- /dev/null +++ b/.github/workflows/doc.yml @@ -0,0 +1,35 @@ +on: + push: + branches: + - main +jobs: + doc: + strategy: + matrix: + racket-variant: ["BC", "CS"] + racket-version: ["8.9", "8.10", "pre-release", "stable", "current"] + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@master + - name: install racket + uses: Bogdanp/setup-racket@v1.11 + with: + architecture: 'x64' + distribution: 'full' + version: 'stable' + - name: install packages + run: raco pkg install --batch --auto ./raco-run{,-cmd} + - name: build documentation + run: | + scribble +m --redirect-main http://pkg-build.racket-lang.org/doc/ \ + --dest ./doc --dest-name index ./raco-run/scribblings/raco-run.scrbl + - name: deploy documentation + run: | + cd doc + git init -b gh-pages + git config user.name 'GHA' + git config user.email samdphillips@gmail.com + git add . + git commit -m 'Deploy to GitHub Pages' + git push --force 'https://samdphillips:${{ github.token }}@github.com/${{ github.repository }}' gh-pages