-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path__deploy_prod.yml__
More file actions
42 lines (35 loc) · 1.08 KB
/
Copy path__deploy_prod.yml__
File metadata and controls
42 lines (35 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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 }}