Skip to content

Commit 7530337

Browse files
committed
chore: migrate the .github workflows
1 parent c5b9c1e commit 7530337

3 files changed

Lines changed: 63 additions & 0 deletions

File tree

.github/workflows/cd-manual.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: CloudFlare Pages Deploy
2+
on:
3+
workflow_dispatch:
4+
5+
jobs:
6+
deploy:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
10+
deployments: write
11+
steps:
12+
- uses: actions/checkout@v3
13+
- run: corepack enable
14+
- uses: actions/setup-node@v4
15+
with:
16+
cache: yarn
17+
node-version: '20'
18+
- name: Bootstrap
19+
run: yarn --immutable
20+
- name: Build
21+
run: yarn build
22+
- name: Publish to Cloudflare Pages
23+
uses: cloudflare/pages-action@1
24+
with:
25+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
26+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
27+
projectName: simpleserialize
28+
directory: ./dist
29+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/label.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Labeler
2+
on: [pull_request]
3+
4+
jobs:
5+
label:
6+
runs-on: ubuntu-latest
7+
if: github.event.pull_request.head.repo.full_name == github.repository
8+
steps:
9+
- uses: actions/labeler@v2
10+
with:
11+
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/semantic-pr.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: "Semantic PR"
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
jobs:
11+
main:
12+
name: Validate PR title
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: amannn/action-semantic-pull-request@v4
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
with:
19+
types: |
20+
fix
21+
feat
22+
chore
23+
revert

0 commit comments

Comments
 (0)