Skip to content

Commit

Permalink
Merge pull request #3 from Student-Labs-2023/feature/deployment/action
Browse files Browse the repository at this point in the history
Feature/deployment/action
  • Loading branch information
Emil307 authored Jul 18, 2023
2 parents ff3b4a2 + b950799 commit e31c61b
Show file tree
Hide file tree
Showing 92 changed files with 12,002 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': 'warn',
},
}
37 changes: 37 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "Deploy application"

on:
push:
- "master"
- "develop"
workflow_dispatch: ~

env:
NODE_VERSION: "20.x"
WRANGLER_VERSION: "3"
PROJECT_NAME: "network-class"

jobs:
deploy:
runs-on: ubuntu-latest
steps:

- name: "Checkout the master branch"
uses: actions/checkout@v3

- name: "Install node.js"
uses: actions/setup-node@v3
with:
node-version: $NODE_VERSION

- name: "Build an application"
run: make build

- name: "Deploy application on Cloudflare Pages"
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: $PROJECT_CLASS
directory: ./dist
wranglerVersion: $WRANGLER_VERSION
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# Devcontainer-related
.devcontainer
6 changes: 6 additions & 0 deletions .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ExpandedNodes": [
""
],
"PreviewInSolutionExplorer": false
}
Binary file added .vs/network-class-frontend-public/v17/.wsuo
Binary file not shown.
Binary file added .vs/slnx.sqlite
Binary file not shown.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build:
@echo "Install dependencies..."
@npm i
@echo "Building project..."
@npm run build
1 change: 0 additions & 1 deletion README.md

This file was deleted.

13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="./public/icons/logo.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Сетевой учебный класс</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading

0 comments on commit e31c61b

Please sign in to comment.