-
Notifications
You must be signed in to change notification settings - Fork 32
51 lines (48 loc) · 1.45 KB
/
continuous-deployment.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
47
48
49
50
51
name: Continuous Deployment
on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: read
deployments: write
jobs:
deploy:
name: Publish Web-Application
runs-on: ubuntu-latest
steps:
- name: Checkout ${{ github.repository }} @ ${{ github.ref }}
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install NodeJS
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install NPM Packages
run: npm install
- name: Code Inspection
run: npm run check
- name: Unit & Component Tests
run: npm run test
- name: Build Web-Application
run: npm run build --workspace=web
- name: Deploy App to CloudFlare
uses: cloudflare/pages-action@v1
with:
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
projectName: haruneko
directory: ./web/build
- name: Build Documentation
run: npm run build --workspace=docs
- name: Deploy Docs to CloudFlare
uses: cloudflare/pages-action@v1
with:
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
projectName: haruneko-docs
directory: ./docs/.vitepress/dist