Skip to content

UPDATE README

UPDATE README #30

name: Deploy to Github Pages
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: actions/checkout@v4
- name: Find and Replace
uses: jacobtomlinson/gha-find-replace@master
with:
find: "https://alandsilva.netlify.app"
replace: "https://alandsilva26.github.io"
- name: Install dependencies
run: npm install
- name: Build
run: CI=false npm run build
env:
VITE_APP_API_KEY: ${{ secrets.VITE_APP_API_KEY }}
VITE_APP_WEBHOOK_URL: ${{ secrets.VITE_APP_WEBHOOK_URL }}
VITE_APP_STEAM_API_KEY: ${{ secrets.VITE_APP_STEAM_API_KEY }}
VITE_APP_STEAM_ID: ${{ secrets.VITE_APP_STEAM_ID }}
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
GITHUB_TOKEN: ${{ secrets.ACTIONS_DEPLOY_ACCESS_TOKEN }}
FOLDER: build
- name: Cache multiple paths
uses: actions/cache@v2
with:
path: |
~/cache
!~/cache/exclude
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}