mirror of
https://github.com/Sheldan/canvas.git
synced 2026-03-27 14:33:50 +00:00
changing deploy workflow
This commit is contained in:
49
.github/workflows/build.yml
vendored
49
.github/workflows/build.yml
vendored
@@ -1,25 +1,44 @@
|
|||||||
name: Execute Build
|
name: Deploy static content to Pages
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches: ['main']
|
||||||
- master
|
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: 'pages'
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
deploy:
|
||||||
|
environment:
|
||||||
|
name: github-pages
|
||||||
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout
|
||||||
- name: Use Node.js
|
uses: actions/checkout@v4
|
||||||
|
- name: Set up Node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '21.x'
|
node-version: 21
|
||||||
|
cache: 'npm'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: npm install
|
||||||
npm ci
|
- name: Build
|
||||||
npx vite build
|
run: npx vite build
|
||||||
- name: Deploy
|
- name: Setup Pages
|
||||||
uses: JamesIves/github-pages-deploy-action@v4
|
uses: actions/configure-pages@v3
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-pages-artifact@v2
|
||||||
with:
|
with:
|
||||||
folder: dist
|
path: './dist'
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
id: deployment
|
||||||
|
uses: actions/deploy-pages@v2
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
root: 'src',
|
root: 'src',
|
||||||
build: {
|
build: {
|
||||||
base: 'https://sheldan.github.io/orbits/',
|
base: '/orbits/',
|
||||||
outDir: '../dist'
|
outDir: '../dist'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user