|
2 | 2 | # https://github.com/webui-dev/zig-webui |
3 | 3 | # Licensed under MIT License. |
4 | 4 | # All rights reserved. |
5 | | - |
6 | 5 | name: DeployDocs |
7 | | - |
8 | 6 | on: |
9 | | - push: |
10 | | - branches: [main] |
11 | | - |
12 | | - # Allows you to run this workflow manually from the Actions tab |
13 | | - workflow_dispatch: |
14 | | - inputs: |
15 | | - logLevel: |
16 | | - description: "Log level" |
17 | | - required: true |
18 | | - default: "warning" |
19 | | - tags: |
20 | | - description: "deploy docs" |
21 | | - |
| 7 | + push: |
| 8 | + branches: [main] |
| 9 | + # Allows you to run this workflow manually from the Actions tab |
| 10 | + workflow_dispatch: |
| 11 | + inputs: |
| 12 | + logLevel: |
| 13 | + description: "Log level" |
| 14 | + required: true |
| 15 | + default: "warning" |
| 16 | + tags: |
| 17 | + description: "deploy docs" |
22 | 18 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages |
23 | 19 | permissions: |
24 | | - contents: write |
25 | | - pages: write |
26 | | - id-token: write |
27 | | - |
| 20 | + contents: write |
| 21 | + pages: write |
| 22 | + id-token: write |
28 | 23 | # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. |
29 | 24 | # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. |
30 | 25 | concurrency: |
31 | | - group: pages |
32 | | - cancel-in-progress: false |
33 | | - |
| 26 | + group: pages |
| 27 | + cancel-in-progress: false |
34 | 28 | jobs: |
35 | | - # Build job |
36 | | - build: |
37 | | - runs-on: ubuntu-latest |
38 | | - steps: |
39 | | - - name: Checkout |
40 | | - uses: actions/checkout@v3 |
41 | | - with: |
42 | | - fetch-depth: 0 # Not needed if lastUpdated is not enabled |
43 | | - - uses: goto-bus-stop/setup-zig@v2 |
44 | | - - name: remove ./src/examples |
45 | | - run: rm -rf ./src/examples |
46 | | - - name: Generate Docs |
47 | | - run: zig build docs |
48 | | - - name: Upload artifact |
49 | | - uses: actions/upload-pages-artifact@v3 |
50 | | - with: |
51 | | - path: ./zig-out/docs |
52 | | - deploy: |
53 | | - environment: |
54 | | - name: github-pages |
55 | | - url: ${{ steps.deployment.outputs.page_url }} |
56 | | - runs-on: ubuntu-latest |
57 | | - needs: build |
58 | | - steps: |
59 | | - - name: Deploy to GitHub Pages |
60 | | - id: deployment |
61 | | - uses: actions/deploy-pages@v4 |
| 29 | + # Build job |
| 30 | + build: |
| 31 | + runs-on: ubuntu-latest |
| 32 | + steps: |
| 33 | + - name: Checkout |
| 34 | + uses: actions/checkout@v3 |
| 35 | + with: |
| 36 | + fetch-depth: 0 # Not needed if lastUpdated is not enabled |
| 37 | + - uses: goto-bus-stop/setup-zig@v2 |
| 38 | + with: |
| 39 | + version: latest |
| 40 | + - name: remove ./src/examples |
| 41 | + run: rm -rf ./src/examples |
| 42 | + - name: Generate Docs |
| 43 | + run: zig build docs |
| 44 | + - name: Upload artifact |
| 45 | + uses: actions/upload-pages-artifact@v3 |
| 46 | + with: |
| 47 | + path: ./zig-out/docs |
| 48 | + deploy: |
| 49 | + environment: |
| 50 | + name: github-pages |
| 51 | + url: ${{ steps.deployment.outputs.page_url }} |
| 52 | + runs-on: ubuntu-latest |
| 53 | + needs: build |
| 54 | + steps: |
| 55 | + - name: Deploy to GitHub Pages |
| 56 | + id: deployment |
| 57 | + uses: actions/deploy-pages@v4 |
0 commit comments