modular-avatar/.github/workflows/build-pages.yml

46 lines
914 B
YAML
Raw Normal View History

2022-09-08 11:46:13 +08:00
name: Build documentation
on:
push:
branches:
2022-09-09 11:37:40 +08:00
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
2022-09-08 11:46:13 +08:00
jobs:
build-listing:
name: build-listing
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/checkout@v3 # check out this repo
- name: Build docs
run: |
cd docs
npm install
2022-09-09 11:37:40 +08:00
npm run build
2022-09-08 11:46:13 +08:00
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
2022-09-09 11:37:40 +08:00
path: docs/build
2022-09-08 11:46:13 +08:00
- name: Deploy to GitHub Pages
id: deployment
2022-09-09 11:37:40 +08:00
uses: actions/deploy-pages@v1