mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 03:37:55 +01:00
ci: deploy master branch to cloudflare as beta
This commit is contained in:
4
.github/workflows/vericrypt.publish.yml
vendored
4
.github/workflows/vericrypt.publish.yml
vendored
@@ -24,8 +24,8 @@ jobs:
|
||||
echo "CLOUDFLARE_ACCOUNT_ID=${{ secrets.CLOUDFLARE_ACCOUNT_ID }}" >> $GITHUB_ENV
|
||||
echo "CLOUDFLARE_API_TOKEN=${{ secrets.CLOUDFLARE_API_TOKEN }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Generate desktop build
|
||||
- name: Generate build
|
||||
run: npm run build:vericrypt
|
||||
|
||||
- name: Publish on Cloudflare Pages
|
||||
run: npx --yes wrangler pages publish --project-name=vericrypt ./apps/vericrypt/build/
|
||||
run: npx --yes wrangler pages deploy --project-name=vericrypt ./apps/vericrypt/build/
|
||||
|
||||
35
.github/workflows/web.beta.publish.yml
vendored
Normal file
35
.github/workflows/web.beta.publish.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: Publish @notesnook/web Beta
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node
|
||||
uses: ./.github/actions/setup-node-with-cache
|
||||
|
||||
- name: Install packages
|
||||
run: |
|
||||
npm ci --ignore-scripts --prefer-offline --no-audit
|
||||
npm run bootstrap -- --scope=web
|
||||
|
||||
- name: Setup environment
|
||||
run: |
|
||||
echo "NX_CLOUD_ACCESS_TOKEN=${{ secrets.NX_CLOUD_ACCESS_TOKEN }}" >> $GITHUB_ENV
|
||||
echo "CLOUDFLARE_ACCOUNT_ID=${{ secrets.CLOUDFLARE_ACCOUNT_ID }}" >> $GITHUB_ENV
|
||||
echo "CLOUDFLARE_API_TOKEN=${{ secrets.CLOUDFLARE_API_TOKEN }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Generate beta build
|
||||
run: npm run build:beta:web
|
||||
|
||||
- name: Publish on Cloudflare Pages
|
||||
run: npx --yes wrangler pages deploy --branch master --project-name=notesnook-beta-app ./apps/web/build/
|
||||
4
.github/workflows/web.publish.yml
vendored
4
.github/workflows/web.publish.yml
vendored
@@ -24,8 +24,8 @@ jobs:
|
||||
echo "CLOUDFLARE_ACCOUNT_ID=${{ secrets.CLOUDFLARE_ACCOUNT_ID }}" >> $GITHUB_ENV
|
||||
echo "CLOUDFLARE_API_TOKEN=${{ secrets.CLOUDFLARE_API_TOKEN }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Generate desktop build
|
||||
- name: Generate build
|
||||
run: npm run build:web
|
||||
|
||||
- name: Publish on Cloudflare Pages
|
||||
run: npx --yes wrangler pages publish --project-name=notesnook-app ./apps/web/build/
|
||||
run: npx --yes wrangler pages deploy --project-name=notesnook-app ./apps/web/build/
|
||||
|
||||
4
nx.json
4
nx.json
@@ -25,6 +25,10 @@
|
||||
"dependsOn": ["^build"],
|
||||
"outputs": ["{projectRoot}/build"]
|
||||
},
|
||||
"build:beta": {
|
||||
"dependsOn": ["^build"],
|
||||
"outputs": ["{projectRoot}/build"]
|
||||
},
|
||||
"build:desktop": {
|
||||
"dependsOn": ["^build"],
|
||||
"outputs": ["{projectRoot}/build"]
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"build:web": "nx build @notesnook/web",
|
||||
"build:vericrypt": "nx build @notesnook/vericrypt",
|
||||
"build:test:web": "nx build:test @notesnook/web",
|
||||
"build:beta:web": "nx build:beta @notesnook/web",
|
||||
"start:web": "nx start @notesnook/web",
|
||||
"start:vericrypt": "nx start @notesnook/vericrypt",
|
||||
"start:desktop": "nx start @notesnook/desktop",
|
||||
|
||||
Reference in New Issue
Block a user