diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 0000000..2e7bfca --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,48 @@ +name: Documentation + +on: +on: + create: + tags: '*' + pull_request: + workflow_dispatch: + +jobs: + build: + permissions: + actions: write + contents: write + pull-requests: read + statuses: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 + with: + version: '1' + - uses: julia-actions/cache@v2 + - name: Install dependencies + run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' + - name: Build and deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key + run: | + julia --project=docs/ docs/make.jl + mv ./docs/build julia + zip -r doc.zip julia + - name: Release + id: doc + uses: ncipollo/release-action@v1 + with: + name: Documentation + commit: main + artifacts: doc.zip + allowUpdates: true + artifactErrorsFailBuild: true + draft: false + prerelease: false + - name: Post-release + run: | + echo "id: ${{ steps.release.outputs.id }}" + echo "HTML url: ${{ steps.release.outputs.html_url }}"