Merge pull request #61 from bcgov/update/confluence-content #66
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Main to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-deploy: | |
name: Build and Deploy Docusaurus to GitHub Pages | |
runs-on: ubuntu-24.04 | |
timeout-minutes: 10 | |
permissions: | |
contents: write | |
pull-requests: write | |
defaults: | |
run: | |
working-directory: ./patterns | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Use Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: npm | |
cache-dependency-path: patterns/package-lock.json | |
- name: Install dependencies | |
run: npm ci --ignore-scripts | |
- name: Build website | |
env: | |
BASE_URL: /nr-architecture-patterns-library | |
run: npm run build | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: patterns/build | |
branch: gh-pages | |
clean-exclude: pr-preview/ | |
single-commit: true # Drop unnecessary commit history from gh-pages | |
force: true # Set to false if we start losing PR deployment previews |