Skip to content

Commit

Permalink
feat: deploy with github action
Browse files Browse the repository at this point in the history
  • Loading branch information
alan890104 committed Jan 21, 2024
1 parent f7832ef commit 27364d9
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
44 changes: 44 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build and Deploy

on:
release:
types: [published]
push:
branches:
- "main"
workflow_dispatch:

permissions:
contents: write

jobs:
deploy:
runs-on: ubuntu-22.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "18"

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.yarn
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: yarn install && yarn build && cp ./dist/index.html ./dist/404.html

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
2 changes: 1 addition & 1 deletion src/components/body/MileStone.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const Milestone = () => {
initial="hidden"
variants={fadeIn("right", 0.3)}
whileInView={"show"}
className="bg-gradient-to-b from-white via-purple-300 to-fuchsia-400 bg-clip-text text-center font-bungee text-2xl font-normal leading-9 text-transparent md:bg-gradient-to-r md:bg-gradient-to-r"
className="bg-gradient-to-b from-white via-purple-300 to-fuchsia-400 bg-clip-text text-center font-bungee text-2xl font-normal leading-9 text-transparent md:bg-gradient-to-r"
>
WOOHA
</motion.div>
Expand Down
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { defineConfig } from "vite";

export default defineConfig({
plugins: [react()],
base: "/ticton/",
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
Expand Down

0 comments on commit 27364d9

Please sign in to comment.