Skip to content

Documentation site

Documentation site #1

Workflow file for this run

# Workflow for deploying website build
name: Deploy static content to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
pull_request:
types: [opened, synchronize, reopened]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# 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: "publish"
cancel-in-progress: false
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Cache JS dependencies
uses: actions/cache@v5
with:
path: ~/.npm
key: dependencies-js-npm-${{ hashFiles('portal/package-lock.json') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, relay, ffi
coverage: none
- name: Composer install
uses: "ramsey/composer-install@v2"
- name: JS install
run: |
npm ci
- name: Build static website
run: |
echo "APP_URL=https://contentmd.org" >> .env && \
npm run build -- --base https://contentmd.org
- name: Upload artifact
uses: actions/upload-pages-artifact@v5
with:
path: build_production/
# Deployment job
deploy:
environment:
name: website
url: 'https://contentmd.org'
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy
id: deployment
# ${{ steps.deployment.outputs.page_url }}
run: |
ls -lah