Skip to content

Commit

Permalink
Merge pull request #57 from tomvothecoder/devops/delete-backend
Browse files Browse the repository at this point in the history
Remove backend and update frontend config
  • Loading branch information
tomvothecoder committed May 22, 2021
2 parents 5eeea9c + 7313305 commit 06fa5a9
Show file tree
Hide file tree
Showing 176 changed files with 162 additions and 3,440 deletions.
File renamed without changes.
File renamed without changes.
7 changes: 0 additions & 7 deletions .github/dependabot.yml

This file was deleted.

61 changes: 0 additions & 61 deletions .github/workflows/backend-ci.yml

This file was deleted.

68 changes: 68 additions & 0 deletions .github/workflows/build_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Build Workflow

on:
push:
branches: [master]

jobs:
publish-site:
if: ${{ github.event_name == 'push' }}
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0

- name: Use Node.js 12.x
uses: actions/setup-node@v2
with:
node-version: '12.x'

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
run: yarn install --frozen-lockfile

- name: Build
run: yarn build

- name: Copy Build and Commit
run: |
git clone https://github.com/tomvothecoder/personal-website.git --branch gh-pages --single-branch gh-pages
cd gh-pages
rm -r *
echo 'tomvo.me' > CNAME
# Add index.html to point to `master` branch automatically
printf '<meta http-equiv="refresh" content="0; url=./dist/index.html" />' >> index.html
cp -r ../dist .
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
# The below command will fail if no changes were present, so we ignore it
git add .
git commit -m "Deploy build" -a || true
- name: Push Changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true
Loading

0 comments on commit 06fa5a9

Please sign in to comment.