Deploy Documentation Production #67
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: Deploy Documentation Production | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| comment: | |
| description: 'Deployment Documentation' | |
| required: false | |
| default: 'Manual Production deployment' | |
| jobs: | |
| build-and-deploy: | |
| if: github.ref_name == 'prod' || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| deployments: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Install dependencies | |
| run: | | |
| npm install | |
| - name: Build frontend | |
| run: npm run build | |
| - name: Deploy to Cloudflare Pages | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| command: pages deploy out --project-name=deploystack-docs --branch=prod | |
| gitHubToken: ${{ secrets.GITHUB_TOKEN }} |