Create deploy-docs.yml

This commit is contained in:
Andrew Lalis 2022-12-20 20:41:31 +01:00 committed by GitHub
parent d130532fb1
commit 6eba6b4cc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 49 additions and 0 deletions

49
.github/workflows/deploy-docs.yml vendored Normal file
View File

@ -0,0 +1,49 @@
name: Publish Docs
on:
push:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
- name: Setup Pages
uses: actions/configure-pages@v2
# - name: Restore Cache
# uses: actions/cache@v3
# with:
# path: |
# dist
- name: Install Dependencies
working-directory: ./docs
run: npm install
- name: Build Static HTML Site
working-directory: ./docs
run: npm run build
- name: Upload to Pages
uses: actions/upload-pages-artifact@v1
with:
path: ./docs/src/.vuepress/dist
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1