File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,12 +2,12 @@ name: CI
22
33on :
44 push :
5- branches-ignore : [ main ]
65 pull_request :
76 branches : [ main ]
87
98permissions :
109 contents : read
10+ deployments : write
1111
1212jobs :
1313 build :
8484 name : playwright-report
8585 path : playwright-report/
8686 retention-days : 14
87+
88+ deploy :
89+ runs-on : ubuntu-latest
90+ needs : build
91+ if : github.event_name == 'push'
92+ steps :
93+ - name : Checkout
94+ uses : actions/checkout@v4
95+
96+ - name : Setup Node
97+ uses : actions/setup-node@v4
98+ with :
99+ node-version : ' 20'
100+ cache : ' npm'
101+
102+ - name : Install dependencies
103+ run : npm ci
104+
105+ - name : Build
106+ run : npm run build
107+ env :
108+ NODE_OPTIONS : " --max_old_space_size=4096"
109+
110+ - name : Deploy to Cloudflare Pages
111+ uses : cloudflare/wrangler-action@v3
112+ with :
113+ apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
114+ accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
115+ command : pages deploy dist --project-name=super-json --branch=${{ github.ref_name }}
You can’t perform that action at this time.
0 commit comments