From 01ec395a83f9b4d344d42d4d0453dae481c88bdc Mon Sep 17 00:00:00 2001 From: Maciej Nowak Date: Thu, 26 Sep 2024 18:47:37 +0200 Subject: [PATCH] Build on GitHub Actions --- .github/workflows/build.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..2a87eca --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,31 @@ +name: Build and publish documentation +on: push +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Install pipx + run: sudo apt-get install -y pipx + - name: Install hatch + run: pipx install hatch==1.9.4 + - uses: actions/checkout@v3 + - name: Build documentation + run: hatch run dev:build + - uses: actions/upload-pages-artifact@v3 + with: + path: build/html + deploy: # https://github.com/actions/deploy-pages + needs: build + if: github.ref == format('refs/heads/{0}', 'github-deploy') #github.event.repository.default_branch) + # Grant GITHUB_TOKEN the permissions required to make a Pages deployment + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file