Cleaning up the bootstrap proceedure #110
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Deploy Documentation | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| actions: read | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Erlang/OTP | |
| uses: erlef/setup-beam@v1 | |
| with: | |
| otp-version: "28" | |
| rebar3-version: "3.24" | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libsodium-dev build-essential gcc make | |
| - name: Cache rebar3 | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/rebar3 | |
| key: ${{ runner.os }}-rebar3-${{ hashFiles('rebar.config') }} | |
| restore-keys: | | |
| ${{ runner.os }}-rebar3- | |
| - name: Clean previous builds | |
| run: | | |
| rebar3 clean | |
| rm -f c_src/*.o | |
| rm -f priv/*.so | |
| - name: Compile application | |
| run: rebar3 compile | |
| - name: Generate documentation | |
| run: rebar3 ex_doc | |
| - name: Setup Pages | |
| id: pages | |
| uses: actions/configure-pages@v4 | |
| with: | |
| enablement: true | |
| continue-on-error: true | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: "./doc" | |
| if: steps.pages.outcome == 'success' | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: github.ref == 'refs/heads/main' && needs.build.result == 'success' | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |
| continue-on-error: true |