Files
discordeno/.github/workflows/site.yml
Jonathan Ho 987b4058cb Site: update site structure and add architecture page (#2675)
* remove blog

* fix: license

* chore: bump docusaurus

* separate benchmark page

* move to sub folder

* fix blog path

* Chore: update site

* fix: only deploy on push and dispatch

* fix: on:

* ci: merge workflow

* ci: fix if

* refactor: dump preset
2022-12-04 08:36:10 -06:00

61 lines
1.6 KiB
YAML

# This is a basic workflow to help you get started with Actions
name: Deploy Docs Site
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: ["main"]
paths:
- "site/**"
pull_request:
branches: ["main"]
paths:
- "site/**"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
name: Build Docusaurus
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./site
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Build website
run: |
npm ci
npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./site/build
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
if: github.event_name != 'pull_request'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1