forked from release-plz/release-plz
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.4 KB
/
website-cd.yml
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
43
44
45
46
name: Website CD # Continuous Deployment
on:
workflow_dispatch: # Allow manual triggers
push:
tags:
- "release-plz-v*.*.*"
jobs:
deploy:
name: Deploy website
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 22
- name: Install dependencies
run: npm ci
working-directory: ./website
- name: Build website
run: npm run build
working-directory: ./website
- name: Deploy to release-plz.dev
uses: cloudflare/wrangler-action@6d58852c35a27e6034745c5d0bc373d739014f7f # v3.13.0
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy ./website/build --project-name=release-plz --branch=main
# Deploy to release-plz.ieni.dev (legacy).
# I couldn't find a way to redirect.
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./website/build