Skip to content

example - do while

example - do while #32

Workflow file for this run

name: SIMA Examples Site
on: [push]
jobs:
build-docs:
name: Build Antora site
runs-on: ubuntu-latest
# Permissions needed for GitHub Pages deployment
permissions:
contents: read
pages: write
id-token: write
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: 'site/package-lock.json'
- name: Install dependencies
run: |
cd site
npm ci
- name: Build Antora site
run: |
cd site
npm run build
# Upload standard artifact for normal workflows
- name: Upload documentation artifact
uses: actions/upload-artifact@v4
with:
name: sima-examples-site-${{ github.ref_name }}
path: site/build/site
retention-days: 1
# Deploy to GitHub Pages only on main branch
- name: Setup Pages
if: github.ref == 'refs/heads/main'
uses: actions/configure-pages@v4
- name: Upload artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
with:
path: 'site/build/site'
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main'
id: deployment
uses: actions/deploy-pages@v4