Skip to content

added deploy workflow #5

added deploy workflow

added deploy workflow #5

Workflow file for this run

name: Deploy Women's Day App
on:
push:
branches:
- main
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
cache-dependency-path: wishes_page/women_day/package-lock.json
- name: Install dependencies
run: npm install
working-directory: wishes_page/women_day
- name: Build project
run: npm run build
working-directory: wishes_page/women_day
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: dist
path: wishes_page/women_day/dist
retention-days: 1 # Store artifact for 1 day
deploy:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: dist
path: wishes_page/women_day/dist
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: wishes_page/women_day/dist