Skip to content

chore: modernize GitHub Actions and Node for site build #139

chore: modernize GitHub Actions and Node for site build

chore: modernize GitHub Actions and Node for site build #139

Workflow file for this run

name: deploy
on:
push:
branches:
- main
# - staging
pull_request:
workflow_dispatch:
repository_dispatch:
types: [ 'interscript/interscript' ]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
build:
name: Build site
runs-on: ubuntu-latest
environment:
name: production
url: https://www.interscript.org
steps:
- uses: actions/checkout@v7
- name: Use Node
uses: actions/setup-node@v7
with:
node-version: '18'
cache: yarn
- name: Install NPM dependencies
run: |
yarn install --frozen-lockfile
yarn global add asciidoctor@^2.2.4
- name: Build site
run: |
yarn adoc make
- name: Upload artifact
uses: actions/upload-pages-artifact@v5
with:
path: dist
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5