From ebac9e921a500c0b8e692b0dbef1726e97782a91 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Mon, 13 Nov 2023 14:17:41 -0600 Subject: [PATCH] ci: add docs ci --- .github/workflows/docs.yml | 74 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 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..aca0c04 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,74 @@ +name: 📄 Build Docs + +on: + push: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-22.04 + permissions: + contents: write + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 16 + + - uses: pnpm/action-setup@v2 + name: Install pnpm + with: + version: 8 + run_install: false + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - uses: jiro4989/setup-nim-action@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Install dependencies + run: pnpm install + + - name: Build Website + run: | + nimble install -Y 'https://github.com/nim-lang/atlas.git@#f7ade65f' + nim setup + nim build + + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: ./site + + deploy: + needs: build + runs-on: ubuntu-latest + + permissions: + pages: write + id-token: write + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2