Build Site #928
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Site | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: | |
- Build Assessment | |
- Build Notes | |
- Build Practicals | |
- Build Studies | |
- Build Slides | |
- Build Cloud Assignment Requirements | |
- Build OpenAPI Docs | |
branches: [main] | |
types: | |
- completed | |
push: | |
paths: | |
- public/** | |
jobs: | |
build-site: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download notes | |
uses: dawidd6/action-download-artifact@v3 | |
with: | |
workflow: build-notes.yml | |
workflow_conclusion: success | |
branch: main | |
path: notes | |
- run: cp -r ./notes/notes/handouts ./public | |
- name: Download practicals | |
uses: dawidd6/action-download-artifact@v3 | |
with: | |
workflow: build-practicals.yml | |
workflow_conclusion: success | |
branch: main | |
path: practicals | |
- run: cp -r ./practicals/practicals/practicals ./public | |
- name: Download studies | |
uses: dawidd6/action-download-artifact@v3 | |
with: | |
workflow: build-studies.yml | |
workflow_conclusion: success | |
branch: main | |
path: studies | |
- run: cp -r ./studies/studies/studies ./public | |
- name: Download slides | |
uses: dawidd6/action-download-artifact@v3 | |
with: | |
workflow: build-slides.yml | |
workflow_conclusion: success | |
branch: main | |
path: slides | |
- run: cp -r ./slides/slides/slides ./public | |
- name: Download assessment | |
uses: dawidd6/action-download-artifact@v3 | |
with: | |
workflow: build-assessment.yml | |
workflow_conclusion: success | |
branch: main | |
path: assessment | |
- run: cp -r ./assessment/assessment/assessment ./public | |
- name: Download specification | |
uses: dawidd6/action-download-artifact@v3 | |
with: | |
workflow: build-spec.yml | |
workflow_conclusion: success | |
branch: main | |
path: cloud-spec | |
- run: cp -r ./cloud-spec/cloud-spec ./public/assessment/spamoverflow | |
- name: Download button specification | |
uses: dawidd6/action-download-artifact@v3 | |
with: | |
workflow: build-api.yml | |
workflow_conclusion: success | |
branch: main | |
path: apis | |
- run: mkdir -p public/api && cp -r ./apis/apis/* ./public/api | |
- name: Publish GH Pages | |
if: github.ref == 'refs/heads/main' | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public |