Skip to content

Commit

Permalink
edit config
Browse files Browse the repository at this point in the history
  • Loading branch information
thenhthang authored Nov 16, 2023
1 parent 91738d0 commit 17a7e2a
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 14 deletions.
39 changes: 28 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
name: Build Vue
on: [push]
name: Deploy to GH Pages

on:
push:
branches:
- master

jobs:
build_vue:
build-deploy:
runs-on: ubuntu-latest
name: Build Vue

steps:
- uses: actions/checkout@v2
- id: Build-Vue
uses: xRealNeon/VuePagesAction@1.0.1
with:
username: 'thenhthang'
reponame: 'cosmosexplorer'
token: ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged
- name: Checkout
uses: actions/checkout@master
with:
persist-credentials: false

- name: Install
run: yarn install

- name: Build 🏗️
run: yarn build
env:
NODE_ENV: production

- name: Deploy to GH Pages
if: ${{ github.event_name != 'pull_request' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: dist
2 changes: 1 addition & 1 deletion src/vue.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true,
publicPath: process.env.NODE_ENV === "production" ? "/vue-deploy/" : "/",
publicPath: process.env.NODE_ENV === "production" ? "/cosmosexplorer/" : "/",
})
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default defineConfig({
},
base: '/cosmosexplorer/',
transpileDependencies: true,
publicPath: process.env.NODE_ENV === "production" ? "/vue-deploy/" : "/",
publicPath: process.env.NODE_ENV === "production" ? "/cosmosexplorer/" : "/",
plugins: [
vue({
template: {
Expand Down
2 changes: 1 addition & 1 deletion vue.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true,
publicPath: process.env.NODE_ENV === "production" ? "/vue-deploy/" : "/",
publicPath: process.env.NODE_ENV === "production" ? "/cosmosexplorer/" : "/",
})

0 comments on commit 17a7e2a

Please sign in to comment.