Skip to content

Commit

Permalink
Merge pull request #21 from weaponsforge/feat/weaponsforge-5
Browse files Browse the repository at this point in the history
Feat/weaponsforge 5 - deploy to production
  • Loading branch information
weaponsforge authored Aug 17, 2024
2 parents 026edf4 + 6935d0a commit 8660da9
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 11 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Deploy to GitHub Pages

# This workflow will trigger on any tag/release created on *any* branch
# Make sure to create tags/releases only from the "master" branch for consistency
on:
release:
types: [published]

jobs:
lint-export-client:
name: Lint and Export client
runs-on: ubuntu-latest
env:
NEXT_PUBLIC_BASE_PATH: ${{ secrets.NEXT_PUBLIC_BASE_PATH }}
NEXT_PUBLIC_FIREBASE_WEB_API_KEY: ${{ secrets.PROD_FIREBASE_WEB_API_KEY }}
NEXT_PUBLIC_FIREBASE_WEB_AUTHDOMAIN: ${{ secrets.PROD_FIREBASE_WEB_AUTHDOMAIN }}
NEXT_PUBLIC_FIREBASE_WEB_PROJECT_ID: ${{ secrets.PROD_FIREBASE_WEB_PROJECT_ID }}
NEXT_PUBLIC_FIREBASE_WEB_STORAGE_BUCKET: ${{ secrets.PROD_FIREBASE_WEB_STORAGE_BUCKET }}
NEXT_PUBLIC_FIREBASE_WEB_MESSAGING_SENDER_ID: ${{ secrets.PROD_FIREBASE_WEB_MESSAGING_SENDER_ID }}
NEXT_PUBLIC_FIREBASE_WEB_APP_ID: ${{ secrets.PROD_FIREBASE_WEB_APP_ID }}
NEXT_PUBLIC_FIREBASE_WEB_MEASUREMENT_ID: ${{ secrets.PROD_FIREBASE_WEB_MEASUREMENT_ID }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.release.tag_name }}
- name: Use NodeJS v20.15.0
uses: actions/setup-node@v3
with:
node-version: 20.15.0
- name: Install Dependencies and lint
run: |
cd app
npm install
- name: Lint
run: |
cd app
npm run lint
- name: Export static files
run: |
cd app
npm run export
mv out/404/index.html out/404.html
- name: Disable Jekyll
run: touch app/out/.nojekyll
- name: Archive Development Artifact
uses: actions/upload-artifact@v3
with:
name: main-out
path: app/out
retention-days: 3

deploy-client:
name: Deploy client to Github Pages
needs: lint-export-client
runs-on: ubuntu-latest
steps:
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: main-out
- name: List files for publish
run: ls -l -a
- name: Deploy to Github Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./
publish_branch: gh-pages
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ Add the following GitHub Secrets to facilitate deployment to the **development**

### Firebase Project

| Development | Production | Description |
| --- | --- | --- |
| DEV_FIREBASE_WEB_API_KEY | PROD_FIREBASE_WEB_API_KEY | Firebase web API key from the Firebase Project Settings configuration file. |
| DEV_FIREBASE_WEB_AUTHDOMAIN | PROD_FIREBASE_WEB_AUTHDOMAIN | Firebase web auth domain key from the Firebase Project Settings configuration file. |
| DEV_FIREBASE_WEB_PROJECT_ID | PROD_FIREBASE_WEB_PROJECT_ID | Firebase web project ID from the Firebase Project Settings configuration file. |
| DEV_FIREBASE_WEB_STORAGE_BUCKET | PROD_FIREBASE_WEB_STORAGE_BUCKET | Firebase web storage bucket key from the Firebase Project Settings configuration file. |
| DEV_FIREBASE_WEB_MESSAGING_SENDER_ID | PROD_FIREBASE_WEB_MESSAGING_SENDER_ID | Firebase web messaging sender ID from the Firebase Project Settings configuration file. |
| DEV_FIREBASE_WEB_APP_ID | PROD_FIREBASE_WEB_APP_ID | Firebase web web app key from the Firebase Project Settings configuration file. |
| DEV_FIREBASE_WEB_MEASUREMENT_ID | PROD_FIREBASE_WEB_MEASUREMENT_ID | Firebase web measurement ID from the Firebase Project Settings configuration file. |
| Development / Production | Description |
| --- | --- |
| DEV_FIREBASE_WEB_API_KEY<br>PROD_FIREBASE_WEB_API_KEY | Firebase web API key from the Firebase Project Settings configuration file. |
| DEV_FIREBASE_WEB_AUTHDOMAIN<br>PROD_FIREBASE_WEB_AUTHDOMAIN | Firebase web auth domain key from the Firebase Project Settings configuration file. |
| DEV_FIREBASE_WEB_PROJECT_ID<br>PROD_FIREBASE_WEB_PROJECT_ID | Firebase web project ID from the Firebase Project Settings configuration file. |
| DEV_FIREBASE_WEB_STORAGE_BUCKET<br>PROD_FIREBASE_WEB_STORAGE_BUCKET | Firebase web storage bucket key from the Firebase Project Settings configuration file. |
| DEV_FIREBASE_WEB_MESSAGING_SENDER_ID<br>PROD_FIREBASE_WEB_MESSAGING_SENDER_ID | Firebase web messaging sender ID from the Firebase Project Settings configuration file. |
| DEV_FIREBASE_WEB_APP_ID<br>PROD_FIREBASE_WEB_APP_ID | Firebase web web app key from the Firebase Project Settings configuration file. |
| DEV_FIREBASE_WEB_MEASUREMENT_ID<br>PROD_FIREBASE_WEB_MEASUREMENT_ID | Firebase web measurement ID from the Firebase Project Settings configuration file. |

### Others

Expand Down
4 changes: 2 additions & 2 deletions app/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function Home() {
>
By{" "}
<Image
src="/vercel.svg"
src="./vercel.svg"
alt="Vercel Logo"
className="dark:invert"
width={100}
Expand All @@ -36,7 +36,7 @@ export default function Home() {
<div className="relative flex place-items-center before:absolute before:h-[300px] before:w-full sm:before:w-[480px] before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-full sm:after:w-[240px] after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700/10 after:dark:from-sky-900 after:dark:via-[#0141ff]/40 before:lg:h-[360px]">
<Image
className="relative dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert"
src="/next.svg"
src="./next.svg"
alt="Next.js Logo"
width={180}
height={37}
Expand Down

0 comments on commit 8660da9

Please sign in to comment.