Skip to content

Commit

Permalink
add: deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseff-Evans committed Aug 12, 2023
1 parent a4ff87c commit aadff02
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 8 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Deploy

on:
push:
branches:
- main

jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 16

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Build project
run: npm run build

- name: Upload production-ready build files
uses: actions/upload-artifact@v2
with:
name: production-files
path: ./dist

deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'

steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: production-files
path: ./dist

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"homepage": "https://joseff-evans.github.io/hangman",
"name": "hangman",
"private": true,
"version": "0.0.0",
Expand Down
16 changes: 8 additions & 8 deletions src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,31 @@ body {

.wordContainer {
display: flex;
justify-Content: center;
justify-content: center;
gap: 0.5rem;
font-Size: 4em;
font-size: 4em;
padding-bottom: 1rem;
}

.wordContainer .letters {
border-bottom: .3rem solid;
width: 2.4rem;
text-Align: "center";
text-align: "center";
}

.letterContainer {
display: flex;
flex-Wrap: wrap;
justify-Content: center;
flex-wrap: wrap;
justify-content: center;
gap: 0.7rem;
font-Size: 1rem;
font-size: 1rem;
padding: 0 2rem 4rem;
}

.letterContainer button {
width: 3rem;
height: 3rem;
border-Radius: 20% 20% 50% 50%;
border-radius: 20% 20% 50% 50%;
background: rgba(0,0,0,0);
font-size: 1.6rem;
border: 2px solid;
Expand Down Expand Up @@ -87,6 +87,6 @@ body {

.resetBanner h2 {
margin: 0;
font-Size: 1.3rem;
font-size: 1.3rem;
padding: 1em;
}
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ import react from '@vitejs/plugin-react'

// https://vitejs.dev/config/
export default defineConfig({
base: "/hangman/",
plugins: [react()],
})

0 comments on commit aadff02

Please sign in to comment.