Add docs from https://github.com/gofiber/fiber/commit/3be36d6 #1270
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 & Deploy GitHub Pages (dual builds, parallel) | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: | |
| - mode: docs | |
| repo: gofiber/docs | |
| cname: docs.gofiber.io | |
| - mode: home | |
| repo: gofiber/website | |
| cname: gofiber.io | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: | | |
| package-lock.json | |
| **/package-lock.json | |
| - name: Restore build caches | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules/.cache | |
| .docusaurus | |
| key: docusaurus-${{ runner.os }}-node20-${{ hashFiles('package-lock.json') }} | |
| restore-keys: | | |
| docusaurus-${{ runner.os }}-node20- | |
| - name: Install deps | |
| run: npm ci | |
| - name: Build (${{ matrix.target.mode }}) | |
| env: | |
| NODE_ENV: production | |
| BUILD_TARGET: ${{ matrix.target.mode }} | |
| INKEEP_API_KEY: ${{ secrets.INKEEP_API_KEY }} | |
| INKEEP_INTEGRATION_ID: ${{ secrets.INKEEP_INTEGRATION_ID }} | |
| INKEEP_ORGANIZATION_ID: ${{ secrets.INKEEP_ORGANIZATION_ID }} | |
| run: | | |
| npm run build:${{ matrix.target.mode }} | |
| - name: Deploy to ${{ matrix.target.cname }} (on master) | |
| if: github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master') | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| personal_token: ${{ secrets.GH_PAGES_TOKEN }} # PAT with Contents: Read and write on both repos | |
| external_repository: ${{ matrix.target.repo }} | |
| publish_dir: ./build | |
| publish_branch: gh-pages | |
| cname: ${{ matrix.target.cname }} | |
| force_orphan: true | |
| - uses: sarisia/actions-status-discord@v1 | |
| if: ${{ failure() || (success() && steps.last_status.outputs.last_status == 'failure') }} | |
| with: | |
| title: "deploy" | |
| description: "Docs: Build & Deploy GitHub Pages" | |
| webhook: ${{ secrets.DISCORD_SECURE_CHANNEL }} |