Skip to content

Commit

Permalink
Add pages deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
Agusx1211 committed Nov 8, 2023
1 parent 242bf4b commit faa9361
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: GH Pages Deploy

on:
push:
branches: [master]
paths-ignore:
- "*.md"

pull_request:
branches: [master]
paths-ignore:
- "*.md"

jobs:
build-deploy:
name: Build and deploy app

runs-on: ubuntu-latest

steps:
- name: Checkout 🛎️
uses: actions/checkout@master
with:
persist-credentials: false

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }} # TODO: Use yarn.lock instead, if that file exists in your repo.
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies 🔧
run: yarn install

- name: Build 🏗️
run: yarn build

- name: Deploy to GH Pages 🚀
if: ${{ github.event_name != 'pull_request' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: build

0 comments on commit faa9361

Please sign in to comment.