Skip to content

vite variables

vite variables #18

Workflow file for this run

# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["pre-feb-29"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
#build vue app
build:
environment:
name: github-pages
runs-on: ubuntu-latest
env:
S_BASE_URL: ${{ secrets.S_BASE_URL }}
E_BASE_URL: ${{ vars.BASE_URL }}
L_BASE_URL: /2024-Spring/
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Install dependencies
run: npm install
working-directory: ./client
- name: Build
run: npm run build
working-directory: ./client
- name: Echo
run: echo "S_BASE_URL=$S_BASE_URL E_BASE_URL=$E_BASE_URL L_BASE_URL=$L_BASE_URL"
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: dist
path: client/dist
retention-days: 1
# Deploy to GitHub Pages
deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: dist
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4