Merge pull request #4 from dapperlabs/dependabot/npm_and_yarn/eslint/… #6
This file contains 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
name: Deploy React Vite to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' # Set your preferred Node.js version | |
- name: Install dependencies | |
run: yarn install | |
- name: Build the Vite app | |
env: | |
VITE_APP_CHAIN_ID: '0x1' | |
run: yarn build | |
- name: Upload build artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./dist # Vite outputs the build to the `dist` folder | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Deploy to GitHub Pages | |
uses: actions/deploy-pages@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} |