diff options
| author | pebble <166765742+ignorant05@users.noreply.github.com> | 2025-12-04 00:17:54 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-03 19:17:54 -0400 |
| commit | ac7b0497ed6d13605fdb4cd4bda557d9182e3037 (patch) | |
| tree | a3013ab74c703c5fe2a2bbaa38b9962ef8dd08d5 /.github/workflows/docs.yml | |
| parent | 8c8b32d59acc78c7c3e1e8ecae8492a1b728b482 (diff) | |
| download | Sakura-ac7b0497ed6d13605fdb4cd4bda557d9182e3037.tar.gz Sakura-ac7b0497ed6d13605fdb4cd4bda557d9182e3037.zip | |
#21 FIX made the problematic line conditional to avoid 404 error code (#23)
#21 FIX Made the problematic line conditional to avoid 404 error code + added some a condition on pull requests in docs workflow
Diffstat (limited to '')
| -rw-r--r-- | .github/workflows/docs.yml | 78 |
1 files changed, 47 insertions, 31 deletions
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ca59856..84048cf 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -4,6 +4,13 @@ on: push: branches: - master + pull_request: + branches: + - master + paths: + - .github/workflows/docs.yml + - include/** + - src/** permissions: contents: read @@ -20,41 +27,49 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 - - name: Setup Erlang/OTP - uses: erlef/setup-beam@v1 - with: - otp-version: '27' - rebar3-version: '3.23' + - name: Setup Erlang/OTP + uses: erlef/setup-beam@v1 + with: + otp-version: "27" + rebar3-version: "3.23" - - name: Restore dependencies cache - uses: actions/cache@v4 - with: - path: | - _build - rebar.lock - key: ${{ runner.os }}-rebar3-${{ hashFiles('rebar.config') }} - restore-keys: | - ${{ runner.os }}-rebar3- + - name: Restore dependencies cache + uses: actions/cache@v4 + with: + path: | + _build + rebar.lock + key: ${{ runner.os }}-rebar3-${{ hashFiles('rebar.config') }} + restore-keys: | + ${{ runner.os }}-rebar3- - - name: Compile - run: rebar3 compile + - name: Compile + run: rebar3 compile - - name: Generate EDoc - run: rebar3 edoc + - name: Generate EDoc + run: rebar3 edoc - - name: Fix index.html for GitHub Pages - run: cp doc/overview-summary.html doc/index.html + - name: Fix index.html for GitHub Pages + run: | + if [ ! -f doc/index.html ]; then + cp doc/overview-summary.html doc/index.html + echo "Copied overview-summary.html to index.html" + else + echo "index.html already exists, skipping" + fi - - name: Setup Pages - uses: actions/configure-pages@v4 + - name: Setup Pages + uses: actions/configure-pages@v4 + if: github.event_name != 'pull_request' - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: 'doc' + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + if: github.event_name != 'pull_request' + with: + path: "doc" deploy: name: Deploy to GitHub Pages @@ -65,6 +80,7 @@ jobs: needs: build steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 + - name: Deploy to GitHub Pages + id: deployment + if: github.event_name != 'pull_request' + uses: actions/deploy-pages@v4 |
