Skip to content

Commit

Permalink
Merge pull request #22 from yuru-baku/autodeploy
Browse files Browse the repository at this point in the history
Autodeploy vue to pages
  • Loading branch information
yuru-baku authored Mar 1, 2024
2 parents 4e14f4d + 91bbcab commit 26104aa
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 71 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/deploy-vue_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build and Deploy Vue App

on:
push:
branches:
- main

permissions:
contents: read
pages: write
id-token: write

jobs:
build-and-deploy:
runs-on: ubuntu-latest
env:
working-directory: frontend-vue

steps:
- uses: actions/[email protected]

- name: Use Node.js 20
uses: actions/[email protected]
with:
node-version: 20

- name: Cache Dependencies
uses: actions/[email protected]
with:
path: ${{env.working-directory}}/node_modules
key: ${{ runner.os }}-build-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-
- name: Install dependencies (on cache miss)
working-directory: ${{env.working-directory}}
if: steps.cache-dependencies.outputs.cache-hit == false
run: npm ci

- name: Build the Vue app
working-directory: ${{env.working-directory}}
run: npm run build

- name: Fix permissions
run: |
chmod -c -R +rX "${{env.working-directory}}/dist" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload GitHub Pages artifact
uses: actions/[email protected]
with:
path: ${{env.working-directory}}/dist
- name: Deploy to GitHub Pages
uses: actions/[email protected]
67 changes: 0 additions & 67 deletions .github/workflows/test-and-deploy.yml

This file was deleted.

2 changes: 1 addition & 1 deletion frontend-vue/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions frontend-vue/src/views/LobbyCreaterView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,21 @@ function copyToClipboard() {
:key="user.id"
:class="{ online: !user.disconnected, offline: user.disconnected }"
>
<font-awesome-icon icon="circle" v-if="user.id !== conService.you.value?.id" />
<font-awesome-icon icon="play" v-if="user.id === conService.you.value?.id" />
<font-awesome-icon
:icon="['fas', 'circle']"
v-if="user.id !== conService.you.value?.id"
/>
<font-awesome-icon
:icon="['fas', 'play']"
v-if="user.id === conService.you.value?.id"
/>
{{ user.name }}
</div>
<div
class="playerStatus empty"
v-for="i in 4 - (conService.room.value?.users.length || 0)"
>
<font-awesome-icon icon="circle" />
<font-awesome-icon :icon="['fas', 'circle']" />
empty
</div>
<button id="invite" @click="copyToClipboard()">Copy Invite</button>
Expand Down
1 change: 1 addition & 0 deletions frontend-vue/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import vue from '@vitejs/plugin-vue'

// https://vitejs.dev/config/
export default defineConfig({
base: '/InfintyDeck',
plugins: [
vue({
template: {
Expand Down

0 comments on commit 26104aa

Please sign in to comment.