Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,27 @@ jobs:
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H ${{ env.DOMAIN }} >> ~/.ssh/known_hosts

- name: Build Frontend
run: |
pushd frontend
npm install --ci
npm run build
popd

- name: Put Site in Maintenance Mode
run: |
ssh deployer@${{ env.DOMAIN }} << 'EOF'
touch ${{ env.MAINTENANCE_FLAG }}
sudo systemctl restart nginx
EOF

- name: Deploy Application
- name: Deploy Frontend
run: |
scp -r frontend/dist/assets deployer@${{ env.DOMAIN }}:${{ env.DEPLOY_PATH }}/public/assets
scp -r frontend/dist/index.html deployer@${{ env.DOMAIN }}:${{ env.DEPLOY_PATH }}/public/index.html
scp -r frontend/dist/favicon.ico deployer@${{ env.DOMAIN }}:${{ env.DEPLOY_PATH }}/public/favicon.ico

- name: Deploy Backend and dependencies
run: |
ssh deployer@165.232.69.153 << 'EOF'
cd ${{ env.DEPLOY_PATH }}
Expand All @@ -39,8 +52,7 @@ jobs:

# build frontend
pushd frontend
npm install
npm run build
npm install --ci
popd

# build symfony
Expand All @@ -60,7 +72,6 @@ jobs:

sudo systemctl restart php8.3-fpm
EOF

- name: Bring Site Back Online
run: |
ssh deployer@${{ env.DOMAIN }} << 'EOF'
Expand Down
18 changes: 9 additions & 9 deletions frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import vueDevTools from "vite-plugin-vue-devtools";

// https://vite.dev/config/
export default defineConfig({
plugins: [vue(), vueDevTools()],
build: {
outDir: "../public",
},
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
plugins: [vue(), vueDevTools()],
build: {
outDir: "./dist",
},
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
});