Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
# Conflicts:
#	package-lock.json
#	src/views/NavMenu.vue
#	src/views/user/Login.vue
  • Loading branch information
丫丫的刀了 committed Feb 24, 2024
2 parents 0778f12 + 1873dd9 commit da3d98b
Show file tree
Hide file tree
Showing 70 changed files with 5,918 additions and 36,598 deletions.
88 changes: 88 additions & 0 deletions .github/workflows/astro.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Sample workflow for building and deploying an Astro site to GitHub Pages
#
# To get started with Astro see: https://docs.astro.build/en/getting-started/
#
name: Deploy Astro site to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# 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

env:
BUILD_PATH: "." # default value when not using subfolders
# BUILD_PATH: subfolder

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Detect package manager
id: detect-package-manager
run: |
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
echo "manager=yarn" >> $GITHUB_OUTPUT
echo "command=install" >> $GITHUB_OUTPUT
echo "runner=yarn" >> $GITHUB_OUTPUT
exit 0
elif [ -f "${{ github.workspace }}/package.json" ]; then
echo "manager=npm" >> $GITHUB_OUTPUT
echo "command=ci" >> $GITHUB_OUTPUT
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
exit 0
else
echo "Unable to determine package manager"
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: ${{ steps.detect-package-manager.outputs.manager }}
cache-dependency-path: ${{ env.BUILD_PATH }}/package-lock.json
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
working-directory: ${{ env.BUILD_PATH }}
- name: Build with Astro
run: |
${{ steps.detect-package-manager.outputs.runner }} astro build \
--site "${{ steps.pages.outputs.origin }}" \
--base "${{ steps.pages.outputs.base_path }}"
working-directory: ${{ env.BUILD_PATH }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ${{ env.BUILD_PATH }}/dist

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
36 changes: 14 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,29 +1,21 @@
*.dmb
*.rsc
*.int
*.lk
*.zip
/node_modules/
*.DS_Store
# build output
dist/

NODE_ENV = 'dev'
node_modules
/dist
# generated types
.astro/

# local env files
.env.local
.env.*.local
# dependencies
node_modules/

# Log files
# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
# environment variables
.env
.env.production

# macOS-specific files
.DS_Store
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:8081",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}"
}
]
Expand Down
31 changes: 0 additions & 31 deletions Html/Vue/one.vue

This file was deleted.

Loading

0 comments on commit da3d98b

Please sign in to comment.