diff --git a/.github/workflows/build.yml b/.github/workflows/build.yaml similarity index 100% rename from .github/workflows/build.yml rename to .github/workflows/build.yaml diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 0000000..66c5834 --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,43 @@ +name: Deploy docs + +on: + push: + branches: [main] + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v3 + - run: | + curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.30/mdbook-v0.4.30-x86_64-unknown-linux-gnu.tar.gz | tar xz + sudo mv mdbook /usr/bin/mdbook + - name: Setup Pages + id: pages + uses: actions/configure-pages@v3 + - run: make docs + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: ./book + + deploy: + runs-on: ubuntu-latest + needs: build + permissions: + pages: read + 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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yaml similarity index 98% rename from .github/workflows/release.yml rename to .github/workflows/release.yaml index 72eb00e..883ad15 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yaml @@ -3,7 +3,7 @@ name: Release on: push: tags: - - '*' + - "*" permissions: contents: write diff --git a/Makefile b/Makefile index 1e50b54..0c04df0 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,7 @@ +.PHONY: docs +docs: + mdbook build + .PHONY: migration migration: ifndef NAME