Created
January 9, 2022 01:50
-
-
Save Breta01/a37678dcd31ed7a3f7b7b06432aa6c8a to your computer and use it in GitHub Desktop.
Deploying your decentralized application to GitHub Pages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build 'client' folder, test and deploy to github pages on branch gh-pages | |
# For more information see: | |
# - https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
# - https://github.com/marketplace/actions/deploy-to-github-pages | |
name: Build and Deploy Frontend | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout ๐๏ธ | |
uses: actions/checkout@v2 | |
- name: Use Node.js 16.x | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16.x' | |
cache: 'yarn' | |
cache-dependency-path: './client/yarn.lock' | |
- name: Install dependencies | |
working-directory: ./client | |
run: yarn install --frozen-lockfile | |
- name: Build ๐ง | |
working-directory: ./client | |
run: PUBLIC_URL="." yarn build | |
- name: Deploy ๐ | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: ./client/build # The folder which will be deployed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment