-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (40 loc) · 1.17 KB
/
github-update-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Demo Test Site Update Action
# Build documentation whenever there are new commits on main
on:
workflow_dispatch:
branches:
- main
push:
branches:
- main
# Restrict permissions for CI jobs
permissions:
contents: read
# Build documentation and upload the static HTML files as an artifact
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: cp -rf library docs/ && cp -rf demos docs/ && cp -rf instruments docs/ && cp -rf tools docs/
- run: mv docs/demos/piano/pianodemo.html docs/ && mv docs/demos/score/scoredemo.html docs/
- run: mv docs/tools/instrument/instrument-creator.html docs/
- run: tar --directory docs/ -hcf artifact.tar .
- uses: actions/upload-artifact@v3
with:
name: github-pages
path: ./artifact.tar
retention-days: 1
# Deploy the artifact to GitHub pages
deploy:
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v1