Skip to content

Commit

Permalink
Merge pull request #5 from rangoack/test
Browse files Browse the repository at this point in the history
update ci
  • Loading branch information
KarlChristomer authored Sep 26, 2023
2 parents d929e7c + bca43e2 commit a8eb35a
Show file tree
Hide file tree
Showing 7 changed files with 5,994 additions and 88 deletions.
56 changes: 20 additions & 36 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
# This is a basic workflow to help you get started with Actions

name: Deploy To Cloudflare [Prod]

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
branches:
- master

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
deploy:
# The type of runner that the job will run on
ci:
runs-on: ubuntu-latest

environment: cf-worker

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@master

- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
Expand All @@ -30,30 +21,23 @@ jobs:
uses: actions/setup-node@v2.1.2
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'

- uses: bahmutov/npm-install@v1

# Runs a single command using the runners shell
- name: Install JS dependencies
run: yarn install
- name: Cache node_modules
uses: actions/cache@v2
with:
path: node_modules
key: ubuntu-node-v${{ steps.nvm.outputs.NVMRC }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}

- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn

# Runs a set of commands using the runners shell
- name: Build
run: yarn run p

- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
run: yarn build
env:
NITRO_PRESET: cloudflare

- name: Publish to Cloudflare
uses: cloudflare/wrangler-action@2.0.0
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: 55cb4036f82767a7f0f757a02a1ec8fd
projectName: vite-org-new
directory: .output/public
# Optional: Enable this if you want to have GitHub Deployments triggered
# gitHubToken: ${{ secrets.GITHUB_TOKEN }}
# Optional: Switch what branch you are publishing to.
# By default this will be the branch which triggered this workflow
branch: master
# Optional: Change the working directory
# workingDirectory: my-site
# Optional: Change the Wrangler version, allows you to point to a specific version or a tag such as `beta`
wranglerVersion: '3'
56 changes: 20 additions & 36 deletions .github/workflows/deploy-test.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
# This is a basic workflow to help you get started with Actions

name: Deploy To Cloudflare [Test]

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ test ]
branches:
- test

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
deploy:
# The type of runner that the job will run on
ci:
runs-on: ubuntu-latest

environment: cf-worker

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@master

- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
Expand All @@ -30,30 +21,23 @@ jobs:
uses: actions/setup-node@v2.1.2
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'

- uses: bahmutov/npm-install@v1

# Runs a single command using the runners shell
- name: Install JS dependencies
run: yarn install
- name: Cache node_modules
uses: actions/cache@v2
with:
path: node_modules
key: ubuntu-node-v${{ steps.nvm.outputs.NVMRC }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}

- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn

# Runs a set of commands using the runners shell
- name: Build
run: yarn run p

- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
run: yarn build
env:
NITRO_PRESET: cloudflare

- name: Publish to Cloudflare
uses: cloudflare/wrangler-action@2.0.0
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: 55cb4036f82767a7f0f757a02a1ec8fd
projectName: vite-org-new
directory: .output/public
# Optional: Enable this if you want to have GitHub Deployments triggered
# gitHubToken: ${{ secrets.GITHUB_TOKEN }}
# Optional: Switch what branch you are publishing to.
# By default this will be the branch which triggered this workflow
branch: test
# Optional: Change the working directory
# workingDirectory: my-site
# Optional: Change the Wrangler version, allows you to point to a specific version or a tag such as `beta`
wranglerVersion: '3'
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
"@nuxt/content": "^2.6.0",
"@types/node": "^18",
"nuxt": "^3.5.3",
"sass": "^1.62.1",
"wrangler": "^3.9.0"
"sass": "^1.62.1"
},
"dependencies": {
"bulma": "^0.9.4",
Expand Down
20 changes: 10 additions & 10 deletions pages/token.vue
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<script setup lang="ts">
import * as echarts from 'echarts';
// import * as echarts from 'echarts';
import mobile from 'is-mobile';
// FIXME: there is a import issue.
// import * as echarts from 'echarts/core';
// import { CanvasRenderer } from 'echarts/renderers';
// import { PieChart } from 'echarts/charts';
// import { LegendComponent } from 'echarts/components';
import * as echarts from 'echarts/core';
import { CanvasRenderer } from 'echarts/renderers';
import { PieChart } from 'echarts/charts';
import { LegendComponent } from 'echarts/components';
useHead({
title: 'VITE coin',
})
const isMobile = mobile();
// echarts.use([
// CanvasRenderer,
// PieChart,
// LegendComponent
// ]);
echarts.use([
CanvasRenderer,
PieChart,
LegendComponent
]);
const pieChartEl = ref<HTMLElement | null>(null);
Expand Down
3 changes: 3 additions & 0 deletions server/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../.nuxt/tsconfig.server.json"
}
8 changes: 4 additions & 4 deletions wrangler.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name = "vite-org-new"
name = "vite-org-new-test"
main = "./.output/server/index.mjs"
workers_dev = true
account_id = "55cb4036f82767a7f0f757a02a1ec8fd"
compatibility_date = "2023-07-22"

[site]
bucket = ".output/public"

[env.production]
name = "vite-org-new"
zone_id = "f88e2f1d3639975a214cd2a56eefba13"

[env.test]
zone_id = "f88e2f1d3639975a214cd2a56eefba13"
Loading

0 comments on commit a8eb35a

Please sign in to comment.