diff options
| author | 2024-08-20 21:36:26 +0800 | |
|---|---|---|
| committer | 2024-08-20 21:36:26 +0800 | |
| commit | 45f878515881824618d032ff5e0032229a21239c (patch) | |
| tree | 2610aa49e41c372265b6083878b94eac2e2e118c | |
| parent | 236a834c38ac071a83aebaf26988bf167d838939 (diff) | |
| download | files-45f878515881824618d032ff5e0032229a21239c.tar.gz files-45f878515881824618d032ff5e0032229a21239c.zip | |
chore: update content
| -rw-r--r-- | .github/workflows/Build_Web_App.yml | 91 | ||||
| -rw-r--r-- | .github/workflows/Deploy_Nodejs.yml | 35 | ||||
| -rw-r--r-- | index.js | 30 | ||||
| -rw-r--r-- | package.json | 23 | ||||
| -rw-r--r-- | vercel.json | 3 | ||||
| -rw-r--r-- | yarn.lock | 4 |
6 files changed, 0 insertions, 186 deletions
diff --git a/.github/workflows/Build_Web_App.yml b/.github/workflows/Build_Web_App.yml deleted file mode 100644 index f0359a2..0000000 --- a/.github/workflows/Build_Web_App.yml +++ /dev/null @@ -1,91 +0,0 @@ -name: Web Build + Deployment to GitHub Pages - -on: - # Runs on push to any of the below branches - push: - branches: - - master - - main - # Runs on pull request events that target one of the below branches - pull_request: - branches: - - master - - main - - # Allows you to run this workflow manually from the Actions tab of the repository - workflow_dispatch: - -# 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: - # https://flet.dev/docs/publish#versioning - BUILD_NUMBER: 1 - BUILD_VERSION: 1.0.0 - PYTHON_VERSION: 3.12.2 - FLUTTER_VERSION: 3.22.2 - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@v2 - with: - python-version: ${{ env.PYTHON_VERSION }} - - - name: Install Python Dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - - - name: Setup Flutter ${{ env.FLUTTER_VERSION }} - uses: subosito/flutter-action@v2 - with: - flutter-version: ${{ env.FLUTTER_VERSION }} - - - name: Flet Build Web - run: | - echo "GITHUB_REPOSITORY: ${GITHUB_REPOSITORY}, USER: ${GITHUB_REPOSITORY%/*}, PROJECT_BASE_URL: ${GITHUB_REPOSITORY#*/}" - flutter config --no-analytics - flet build web --base-url ${GITHUB_REPOSITORY#*/} --route-url-strategy hash - - - name: Upload Artifact - uses: actions/upload-pages-artifact@v3 - with: - name: web-build-artifact # the name of the artifact - path: build/web - - deploy: - needs: build # wait for the "build" job to get done before executing this "deploy" job - - runs-on: ubuntu-latest - - # Grant GITHUB_TOKEN the permissions required to make a Pages deployment - permissions: - pages: write # to deploy to Pages - id-token: write # to verify the deployment originates from an appropriate source - - # Deploy to the github-pages environment - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - - steps: - - name: Setup Pages - uses: actions/configure-pages@v5 - - - name: Deploy to GitHub Pages 🚀 - if: github.event_name == 'push' # deploy only on push - id: deployment - uses: actions/deploy-pages@v4.0.5 - with: - artifact_name: web-build-artifact -
\ No newline at end of file diff --git a/.github/workflows/Deploy_Nodejs.yml b/.github/workflows/Deploy_Nodejs.yml deleted file mode 100644 index 0c70d11..0000000 --- a/.github/workflows/Deploy_Nodejs.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Deploy to GitHub Pages - -on: - push: - branches: - - main - -jobs: - build: - permissions: - contents: write - pull-requests: write - id-token: write - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: '14' - - - name: Install dependencies - run: yarn install - - - name: Build project - run: yarn build - - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./public
\ No newline at end of file diff --git a/index.js b/index.js deleted file mode 100644 index 51c542b..0000000 --- a/index.js +++ /dev/null @@ -1,30 +0,0 @@ -const express = require('express'); -const fs = require('fs'); -const path = require('path'); - -const app = express(); -const PORT = 3000; - -app.use(express.static('public')); - -app.get('/api/files', (req, res) => { - const directoryPath = path.join(__dirname, 'files'); - const getDirectoryTree = (dirPath) => { - const files = fs.readdirSync(dirPath); - return files.map(file => { - const filePath = path.join(dirPath, file); - const isDirectory = fs.statSync(filePath).isDirectory(); - return { - name: file, - path: filePath, - isDirectory, - children: isDirectory ? getDirectoryTree(filePath) : [] - }; - }); - }; - res.json(getDirectoryTree(directoryPath)); -}); - -app.listen(PORT, () => { - console.log(`Server is running on http://localhost:${PORT}`); -});
\ No newline at end of file diff --git a/package.json b/package.json deleted file mode 100644 index bed59c5..0000000 --- a/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "files", - "version": "1.0.0", - "author": "简律纯", - "scripts": { - "build": "yarn build'" - }, - "dependencies": { - "express": "^4.17.1" - }, - "description": "files upload.", - "main": "index.js", - "devDependencies": {}, - "repository": { - "type": "git", - "url": "git+https://github.com/HydroRoll-Team/files.git" - }, - "license": "ISC", - "bugs": { - "url": "https://github.com/HydroRoll-Team/files/issues" - }, - "homepage": "https://github.com/HydroRoll-Team/files#readme" -} diff --git a/vercel.json b/vercel.json deleted file mode 100644 index 1fccd7b..0000000 --- a/vercel.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "redirects": [{ "source": "/", "destination": "/api" }] - }
\ No newline at end of file diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index fb57ccd..0000000 --- a/yarn.lock +++ /dev/null @@ -1,4 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - |
