Skip to content

Commit

Permalink
fix(infra): Refazer deploy github pages :octocat:
Browse files Browse the repository at this point in the history
  • Loading branch information
wh1t3h47 committed Oct 13, 2023
1 parent df16788 commit d041be6
Showing 1 changed file with 36 additions and 10 deletions.
46 changes: 36 additions & 10 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,43 @@
name: React app deployment

on:
push:
branches: [master]
pull_request:
branches: [master]
branches:
- master

permissions:
contents: read
pages: write
id-token: write

jobs:
build:
deploy:
runs-on: ubuntu-latest

environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
- uses: actions/checkout@v2
# Checkout project repository
- name: Checkout
uses: actions/checkout@v3

# Setup Node.js environment
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "16.x"

# Install dependencies
- name: Install dependencies
run: yarn install --prefer-offline

# Build Application
- name: Build application
run: yarn build

- name: Deploy react app to github pages
uses: tanwanimohit/[email protected]
# Deploy to Github Pages
- id: deploy
name: Deploy to Github Pages
uses: fcodelabs/[email protected]
with:
build_dir: dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit d041be6

Please sign in to comment.