Skip to content

Commit b19e158

Browse files
authored
Merge pull request #38 from ltv/main-deployment
feat(deploy): CloudFront deployment
2 parents 0cf9e82 + 4858394 commit b19e158

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

.github/workflows/main.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# This workflow will build a docker container, publish it to Github Packages
2+
name: Build DEV
3+
4+
on:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
deploy-cloudfront:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Cache node modules
14+
uses: actions/cache@v3
15+
with:
16+
path: ~/.yarn
17+
key: ${{ runner.os }}-build-source-${{ hashFiles('**/yarn.lock') }}
18+
restore-keys: |
19+
${{ runner.os }}-build-source-
20+
${{ runner.os }}-build-
21+
${{ runner.os }}-
22+
23+
- name: Install dependencies
24+
run: yarn --cache-folder ~/.yarn --frozen-lockfile --check-files
25+
26+
- name: Build source
27+
run: yarn build
28+
29+
- name: S3 and CloudFront Deploy
30+
run: |
31+
aws s3 sync ./dist s3://${{ secrets.S3_BUCKET_NAME }}
32+
env:
33+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
34+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
35+
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
36+
notify:
37+
needs: [deploy-cloudfront]
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: appleboy/telegram-action@master
41+
with:
42+
to: ${{ secrets.TELEGRAM_CHAT_ID }}
43+
token: ${{ secrets.TELEGRAM_RELEASE_BOT_TOKEN }}
44+
format: markdown
45+
message: |
46+
`[Fancy-Dashboard]` Deployed Fancy-Dashboard on Dev

src/layouts/default-layout.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export default defineComponent({
8585
},
8686
8787
setup() {
88-
const route = useRoute()
88+
const route: any = useRoute()
8989
const store = useDashboardStore()
9090
const isPin = computed<boolean>(() => store.isPin)
9191
const setIsPin = (b: boolean) => store.setSideBar(b)

0 commit comments

Comments
 (0)