diff --git a/.github/workflows/vite_deploy.yaml b/.github/workflows/vite_deploy.yaml deleted file mode 100644 index 35d1f0f..0000000 --- a/.github/workflows/vite_deploy.yaml +++ /dev/null @@ -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 diff --git a/.woodpecker.yaml b/.woodpecker.yaml new file mode 100644 index 0000000..a526c95 --- /dev/null +++ b/.woodpecker.yaml @@ -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 diff --git a/README.md b/README.md index 04d0d41..c207b93 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # Frontend Mentor - NFT preview card component solution -This is a solution to the [NFT preview card component challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/nft-preview-card-component-SbdUL_w0U). Frontend Mentor challenges help you improve your coding skills by building realistic projects. +This is a solution to the [NFT preview card component challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/nft-preview-card-component-SbdUL_w0U). diff --git a/vite.config.js b/vite.config.js index deca8dd..33b7513 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,5 +1,5 @@ import { defineConfig } from "vite"; export default defineConfig({ - base: "/fem-nft-preview-card/", + base: "/nft-preview-card/", });