|
7 | 7 | env: |
8 | 8 | SITE_DIR: "gh-pages" |
9 | 9 | jobs: |
10 | | - build_site: |
11 | | - name: "Build site with Antora" |
12 | | - runs-on: [ubuntu-latest] |
| 10 | + build-and-publish: |
| 11 | + runs-on: ubuntu-22.04 |
13 | 12 | steps: |
14 | | - - name: Checkout |
15 | | - uses: actions/checkout@v2 |
16 | | - - name: "Generate site using antora site action" |
17 | | - uses: kameshsampath/antora-site-action@master |
18 | | - with: |
19 | | - antora_playbook: site.yml |
20 | | - - name: "Upload generated site" |
21 | | - |
22 | | - with: |
23 | | - name: site |
24 | | - path: "${{ github.workspace }}/${{ env.SITE_DIR }}" |
25 | | - deploy_site: |
26 | | - runs-on: [ubuntu-latest] |
27 | | - needs: [build_site] |
28 | | - name: "Deploy GitHub Pages" |
29 | | - steps: |
30 | | - - name: Checkout |
31 | | - uses: actions/checkout@v2 |
32 | | - - name: Download generated site |
33 | | - uses: actions/download-artifact@v1 |
34 | | - with: |
35 | | - name: site |
36 | | - path: "${{ github.workspace }}/${{ env.SITE_DIR }}" |
37 | | - - name: Deploy to GitHub Pages |
38 | | - |
39 | | - with: |
40 | | - # ACCESS_TOKEN: # optional |
41 | | - GITHUB_TOKEN: "${{ github.token}}" |
42 | | - FOLDER: "${{ env.SITE_DIR }}" |
43 | | - BRANCH: "gh-pages" |
44 | | - COMMIT_MESSAGE: "[CI] Publish Documentation for ${{ github.sha }}" |
| 13 | + - name: Checkout project |
| 14 | + uses: actions/checkout@v4 |
| 15 | + with: |
| 16 | + fetch-depth: 0 |
| 17 | + - name: Run antora |
| 18 | + uses: docker://antora/antora:2.3.1 |
| 19 | + with: |
| 20 | + args: github-pages.yml |
| 21 | + - name: Deploy to GitHub Pages |
| 22 | + uses: JamesIves/github-pages-deploy-action@releases/v4 |
| 23 | + with: |
| 24 | + token: "${{github.token}}" |
| 25 | + FOLDER: gh-pages |
| 26 | + BRANCH: gh-pages |
| 27 | + commit-message: "[docs] Publishing the docs for commit(s) ${{github.sha}}" |
0 commit comments