1
Fork 0

Add workflow
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Hadeed 2024-10-07 18:40:22 +05:00
parent b05d0e2819
commit fcaad59eff
4 changed files with 21 additions and 48 deletions

View file

@ -1,44 +0,0 @@
name: Deploy static content to Pages
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "./dist"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

19
.woodpecker.yaml Normal file
View file

@ -0,0 +1,19 @@
steps:
- name: deploy
image: node:current-alpine
commands:
- apk add --no-cache zip curl
- rm package-lock.json
- npm install
- npm run build
- (cd dist && zip -r ../project.zip ./*)
- 'AUTH_HEADER="Authorization: Bearer $PAGES_API_KEY"'
- API_URL=https://pages.hadeedahmad.com/pages/$(basename "$PWD")
- curl -s -w "%{http_code}" -F "zipfile=@project.zip" -H "$AUTH_HEADER" "$API_URL" | grep -q 200
secrets: [ PAGES_API_KEY ]
when:
- event: manual
- event: push
branch: main

View file

@ -1,5 +1,3 @@
# Frontend Mentor - Product preview card component solution
This is a solution to the [Product preview card component challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/product-preview-card-component-GO7UmttRfa). Frontend Mentor challenges help you improve your coding skills by building realistic projects.
![](./screenshot.jpg)
This is a solution to the [Product preview card component challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/product-preview-card-component-GO7UmttRfa).

View file

@ -1,5 +1,5 @@
import { defineConfig } from "vite";
export default defineConfig({
base: "/fem-product-preview-card/",
base: "/product-preview-card/",
});