Skip to content

Commit

Permalink
Added .github action
Browse files Browse the repository at this point in the history
  • Loading branch information
rbo committed Jun 14, 2024
1 parent a6f552c commit 6176fc7
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: docs

on:
push:
branches:
- main
env:
SITE_DIR: "www"
jobs:
build_site:
name: "Build site with Antora"
runs-on: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Configure Pages
uses: actions/configure-pages@v3

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install Antora
run: npm i antora
- name: Generate Site
run: npx antora default-site.yml

- name: "Upload generated site"
uses: actions/upload-artifact@v2
with:
name: site
path: "${{ github.workspace }}/${{ env.SITE_DIR }}"

deploy_site:
runs-on: [ubuntu-latest]
needs: [build_site]
name: "Deploy GitHub Pages"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download generated site
uses: actions/download-artifact@v1
with:
name: site
path: "${{ github.workspace }}/${{ env.SITE_DIR }}"
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@3.2.1
with:
# ACCESS_TOKEN: # optional
GITHUB_TOKEN: "${{ github.token}}"
FOLDER: "${{ env.SITE_DIR }}"
BRANCH: "gh-pages"
COMMIT_MESSAGE: "[CI] Publish Documentation for ${{ github.sha }}"

0 comments on commit 6176fc7

Please sign in to comment.