Skip to content

Commit b8bfc30

Browse files
committed
Remove backend and move frontend to root
Add build_workflow.yml to serve build Update .gitignore Add Vue router redirect - Remove unused script in package.json - Update vue.config.js publicPath
1 parent 5eeea9c commit b8bfc30

File tree

176 files changed

+164
-3439
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+164
-3439
lines changed
File renamed without changes.
File renamed without changes.

.github/dependabot.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/workflows/backend-ci.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

.github/workflows/build_workflow.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Build Workflow
2+
3+
on:
4+
push:
5+
branches: [master]
6+
7+
jobs:
8+
publish-site:
9+
if: ${{ github.event_name == 'push' }}
10+
runs-on: ubuntu-latest
11+
defaults:
12+
run:
13+
shell: bash -l {0}
14+
steps:
15+
- uses: actions/checkout@v2
16+
with:
17+
persist-credentials: false
18+
fetch-depth: 0
19+
20+
- name: Use Node.js 12.x
21+
uses: actions/setup-node@v2
22+
with:
23+
node-version: '12.x'
24+
25+
- name: Cache node modules
26+
uses: actions/cache@v2
27+
env:
28+
cache-name: cache-node-modules
29+
with:
30+
path: ~/.cache/yarn
31+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
32+
restore-keys: |
33+
${{ runner.os }}-build-${{ env.cache-name }}-
34+
${{ runner.os }}-build-
35+
${{ runner.os }}-
36+
37+
- name: Install Dependencies
38+
run: yarn install --frozen-lockfile
39+
40+
- name: Build
41+
run: yarn build
42+
43+
- name: Copy Build and Commit
44+
run: |
45+
git clone https://github.com/tomvothecoder/personal-website.git --branch gh-pages --single-branch gh-pages
46+
47+
cd gh-pages
48+
rm -r *
49+
echo 'tomvo.me' > CNAME
50+
51+
# Add index.html to point to `master` branch automatically
52+
printf '<meta http-equiv="refresh" content="0; url=./dist/index.html" />' >> index.html
53+
cp -r ../dist .
54+
55+
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
56+
git config --local user.name "github-actions[bot]"
57+
58+
# The below command will fail if no changes were present, so we ignore it
59+
git add .
60+
git commit -m "Deploy build" -a || true
61+
62+
- name: Push Changes
63+
uses: ad-m/github-push-action@master
64+
with:
65+
branch: gh-pages
66+
directory: gh-pages
67+
github_token: ${{ secrets.GITHUB_TOKEN }}
68+
force: true

0 commit comments

Comments
 (0)