Publish fix (#29) #8
This file contains hidden or 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 and Deploy GitHub Pages" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install tooling | |
| run: | | |
| ./install-tooling.sh | |
| export NVM_DIR="$HOME/.nvm" | |
| [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" | |
| - name: Build | |
| run: | | |
| ./build-openapi.sh | |
| echo "Copying files to publish directory" | |
| mkdir -p publish/interface/schemata | |
| cp interface/schemata/* publish/interface/schemata | |
| cp build/device.yaml publish/interface/schemata/device.yaml | |
| mkdir -p publish/docs | |
| cp -r docs/openapi.yaml publish/docs/openapi.yaml | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: publish | |
| enable_jekyll: true |