Skip to content

Update ci-cd.yml

Update ci-cd.yml #7

Workflow file for this run

name: Frontend CI/CD
on: push
defaults:
run:
working-directory: ./bannerlord-tavern-games-frontend
jobs:
# Build Job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install Dependencies
run: yarn install
- name: Build Project
run: yarn build
- name: Upload artifact to enable deployment
uses: actions/upload-artifact@v3
with:
name: production-files
path: ./bannerlord-tavern-games-frontend/dist
# Deploy Job
deploy:
# Add a dependency to the build job
needs: build
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: production-files
path: ./bannerlord-tavern-games-frontend/dist
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.CI_CD_TOKEN }}
publish_dir: ./bannerlord-tavern-games-frontend/dist