Skip to content

Deploy to GitHub pages by @o-l-a-v #4

Deploy to GitHub pages by @o-l-a-v

Deploy to GitHub pages by @o-l-a-v #4

name: Deploy to GitHub pages
run-name: '${{ github.workflow }} by @${{ github.actor }}'
on:
push:
branches:
- main
paths:
- website/**
concurrency:
group: 'pages'
cancel-in-progress: false
jobs:
build:
name: Build Docusaurus
defaults:
run:
working-directory: ./website
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- name: 🛎️ GitHub checkout branch "${{ github.head_ref || github.ref_name }}"
uses: actions/checkout@v4
with:
persist-credentials: false
- name: ⚙️ Enable corepack
run: corepack enable
- name: ⚙️ Setup Node.js
uses: actions/setup-node@v4
with:
cache: 'yarn'
cache-dependency-path: './website/yarn.lock'
node-version-file: './website/.node-version'
- name: 🧶 Yarn install
run: yarn install --immutable
- name: 🔨 Node.js build
run: node --run build
- name: ⬆️ Upload artifact
uses: actions/upload-pages-artifact@v3
id: artifact
with:
path: website/build/
deploy:
name: Deploy to GitHub Pages
environment:
name: github-pages
url: ${{ steps.artifact.outputs.page_url }}
needs: build
permissions:
contents: read
id-token: write
pages: write
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4