Build and Deploy Documentation #6
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 Documentation | |
| on: | |
| workflow_dispatch: # Enables manual trigger | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.21' | |
| - name: Install Go Task | |
| run: | | |
| curl -L https://github.com/go-task/task/releases/download/v3.14.0/task_linux_amd64.tar.gz | tar xz | |
| sudo mv task /usr/local/bin/ | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| pip install --upgrade pip | |
| pip install pipenv | |
| pipenv lock --clear | |
| pipenv install --deploy --system | |
| - name: Build documentation | |
| run: | | |
| task build | |
| - name: Create documentation archive | |
| run: | | |
| tar -czvf csdocs.tar.gz -C site . | |
| - name: Upload documentation as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: csdocs | |
| path: ./csdocs.tar.gz | |
| if-no-files-found: error |