Skip to content

[WIP] I want to merge the current two github actions to one called build-html-and-deploy-pages.yml I've drafted its content as below: ``` name: Build HTML from Sample CV on: push: branches: - master pull_request: branches: - master ...#17

Closed
Copilot wants to merge 1 commit intomasterfrom
copilot/fix-cbf3164c-6d79-460e-bb43-667ae561b5ea

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jul 16, 2025

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.

Original description:

I want to merge the current two github actions to one called build-html-and-deploy-pages.yml

I've drafted its content as below:

name: Build HTML from Sample CV

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  build-html:
    runs-on: ubuntu-latest
    
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
        
      - name: Set up Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '18'
          cache: 'npm'
          
      - name: Install dependencies
        run: npm install
        
      - name: Build HTML from sample.cv.json
        run: |
          DATA_FILENAME="${{ github.workspace }}/sample.cv.json" \
          OUT_DIR="${{ github.workspace }}/output" \
          npm run build
          
      - name: Upload HTML artifact
        uses: actions/upload-artifact@v4
        with:
          name: sample-cv-html
          path: output/index.html
          retention-days: 30

      - name: Build site
        run: npm run build-site

      - name: Publish
        uses: cloudflare/pages-action@v1
        with:
          apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
          accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
          projectName: jsoncv
          directory: src/dist
          branch: master

the problem is , I only want to run the last two steps when the current branch is master, please add proper 'if' for both of the steps


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants