Skip to content

Commit

Permalink
Added github deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
mityaua committed Nov 7, 2024
1 parent e9b859e commit d95d0d6
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 10 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deploy

on:
push:
branches:
- main

jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Build project
run: npm run build

- name: Upload production-ready build files
uses: actions/upload-artifact@v4
with:
name: production-files
path: ./dist

deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'

steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: production-files
path: ./dist

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"vueIndentScriptAndStyle": false,
"singleAttributePerLine": false,
"embeddedLanguageFormatting": "auto",
"plugins": ["prettier-plugin-tailwindcss", "prettier-plugin-organize-attributes"],
"plugins": ["prettier-plugin-organize-attributes", "prettier-plugin-tailwindcss"],
"attributeGroups": ["^v-", "$DEFAULT", "^id$", "^class$", "^aria-", "^[:]", "^@"]
}
16 changes: 7 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,23 @@
"preview": "vite preview",
"predeploy": "npm run build",
"format": "prettier --write src/",
"type-check": "vue-tsc --noEmit -p tsconfig.json --composite false",
"deploy": "gh-pages -d dist"
"type-check": "vue-tsc --noEmit -p tsconfig.json --composite false"
},
"dependencies": {
"vue": "^3.5.10",
"vue": "^3.5.12",
"vue-draggable-next": "^2.2.1"
},
"devDependencies": {
"@types/node": "^22.7.4",
"@types/node": "^22.9.0",
"@vitejs/plugin-vue": "^5.1.4",
"autoprefixer": "^10.4.20",
"gh-pages": "^6.1.1",
"postcss": "^8.4.47",
"prettier": "^3.3.3",
"prettier-plugin-organize-attributes": "^1.0.0",
"prettier-plugin-tailwindcss": "^0.6.8",
"tailwindcss": "^3.4.13",
"typescript": "^5.6.2",
"vite": "^5.4.8",
"vue-tsc": "^2.1.6"
"tailwindcss": "^3.4.14",
"typescript": "^5.6.3",
"vite": "^5.4.10",
"vue-tsc": "^2.1.10"
}
}

0 comments on commit d95d0d6

Please sign in to comment.